Added: create-bundle script
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
.idea
|
.idea
|
||||||
data
|
data
|
||||||
|
tmp
|
||||||
temp
|
temp
|
||||||
node_modules
|
node_modules
|
||||||
app/node_modules
|
app/node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
scripts
|
scripts
|
||||||
docs
|
docs
|
||||||
|
_releases
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@ data
|
|||||||
temp
|
temp
|
||||||
node_modules
|
node_modules
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
_releases
|
||||||
|
|||||||
32
scripts/create-bundle.sh
Executable file
32
scripts/create-bundle.sh
Executable file
@@ -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"
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# tar -czf psitransfer-1.0.0-rc.1.tar.gz --transform 's~^~psitransfer-1.0.0-rc.1/~' LICENSE README.md app.js config.* data lib package.json public
|
|
||||||
Reference in New Issue
Block a user