Skip to content

Commit

Permalink
Added: create-bundle script
Browse files Browse the repository at this point in the history
  • Loading branch information
psi-4ward committed May 7, 2017
1 parent 747ada1 commit 5b2ffa9
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
.idea
data
tmp
temp
node_modules
app/node_modules
npm-debug.log
scripts
docs
_releases
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ data
temp
node_modules
npm-debug.log
_releases
32 changes: 32 additions & 0 deletions scripts/create-bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash
set -e

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR

# Get the current tag or use commit hash if there's none
NAME=$(git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/null || git log -n1 --pretty='%h')

echo "Building app"
cd $DIR/../app
npm install
npm run build


echo "Bundling to _releases/psitransfer-$NAME.tar.gz"
cd $DIR/..
mkdir -p _releases

tar -czf _releases/psitransfer-$NAME.tar.gz --transform "s~^~psitransfer-$NAME/~" \
LICENSE \
README.md \
Dockerfile \
.dockerignore \
app.js \
config.js \
package.json \
docs \
lib \
public

echo "DONE"
3 changes: 0 additions & 3 deletions tmp/scripts/release.sh

This file was deleted.

0 comments on commit 5b2ffa9

Please sign in to comment.