-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcompile-build
More file actions
executable file
·32 lines (31 loc) · 882 Bytes
/
compile-build
File metadata and controls
executable file
·32 lines (31 loc) · 882 Bytes
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
#!/bin/bash
set -e
echo 'Cleaning up'
NODE_ENV=production bundle exec rake assets:clobber
echo 'Compiling assets'
NODE_ENV=production bundle exec rake assets:precompile
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='./.git' \
--exclude='./.gitignore' \
--exclude='./.tags' \
--exclude='./README*' \
--exclude='./compile-build' \
--exclude='./coverage' \
--exclude='./*.sublime-project' \
--exclude='./log/*' \
--exclude='./spec' \
--exclude='./test' \
--exclude='./tmp' \
--exclude='./vendor/bundle' \
--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