forked from sanger/samples_extraction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile-build
44 lines (43 loc) · 1.25 KB
/
compile-build
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
#!/bin/bash
set -e
echo 'Cleaning up'
RAILS_ENV=production bundle exec rake assets:clobber
echo 'Compiling assets'
RAILS_ENV=production bundle exec rake assets:precompile
RAILS_ENV=production bundle exec rake webpacker:compile
echo 'Generating sha'
git rev-parse HEAD > REVISION
git tag -l --points-at HEAD --sort -version:refname | head -1 > TAG
git rev-parse --abbrev-ref HEAD > BRANCH
echo 'Compiling tar.gz'
tar \
--exclude='./*.swp' \
--exclude='./.bundle' \
--exclude='./.codeclimate.yml' \
--exclude='./.git' \
--exclude='./.gitignore' \
--exclude='./.rspec' \
--exclude='./.rubocop*' \
--exclude='./.simplecov' \
--exclude='./.tags' \
--exclude='./.travis.yml' \
--exclude='./README*' \
--exclude='./compile-build' \
--exclude='./coverage' \
--exclude='./features' \
--exclude='./knapsack_cucumber_report.json' \
--exclude='./log/*' \
--exclude='./node_modules' \
--exclude='./run_coverage' \
--exclude='./sbin' \
--exclude='./*.sublime-project' \
--exclude='./spec' \
--exclude='./test' \
--exclude='./tmp' \
--exclude='./vendor/bundle' \
--exclude='./yarn.lock' \
--exclude='release.tar.gz' \
-zcf /tmp/release.tar.gz ./
mv /tmp/release.tar.gz ./release.tar.gz
echo 'Release complete!'
echo `pwd`/release.tar.gz