forked from keeganquinn/cwnmyr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·47 lines (31 loc) · 1.18 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
# Automated build script. Intended for continuous integration use.
build=${BUILD_NUMBER:-"current"}
set -ex
find . -maxdepth 2 -name '*.sh' -print0 | xargs -0 -n1 -t shellcheck
[ -d .bundle ] || mkdir -p .bundle
[ -f .bundle/config ] || (
echo '---'
echo 'BUNDLE_PATH: "vendor"'
echo 'BUNDLE_DISABLE_SHARED_GEMS: "true"'
echo 'BUNDLE_WITHOUT: "production"'
) > .bundle/config
bundle install
npm install --frozen-lockfile
rm -rf checkstyle-*.xml coverage coverage-js doc jsdoc junit.xml rspec.xml \
log/* public/assets tmp/*
npm -s test || true
npm -s run jsdoc || true
npm -s run jsonlint || true
npm -s run pkglint || true
npm -s run lint -- --format node_modules/eslint-formatter-checkstyle-* \
> checkstyle-eslint.xml || true
bundle exec rubocop --require rubocop/formatter/checkstyle_formatter \
--format RuboCop::Formatter::CheckstyleFormatter \
-o checkstyle-rubocop.xml || true
bundle exec haml-lint app --reporter checkstyle \
> checkstyle-haml-lint.xml || true
bundle exec yard || true
bundle exec rake db:create db:environment:set db:schema:load RAILS_ENV=test
bundle exec rake spec BUILD_NUMBER="${build}" || true
exit 0