forked from sanger/sequencescape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile-build
executable file
·41 lines (41 loc) · 1.2 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
#!/bin/bash
set -e # Exit immediately if something fails
export NODE_ENV=production
export RAILS_ENV=production
echo 'Compiling assets'
bundle exec rake vite:build
echo 'Generating sha'
echo ${1:-$(git rev-parse HEAD)} > REVISION
echo ${2:-$(git tag -l --points-at HEAD --sort -version:refname | head -1)} > TAG
echo ${3:-$(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='./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