|
|
|
@ -1,6 +1,9 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
REPO=$(cd $(dirname $0); pwd)
|
|
|
|
|
REPO=$(
|
|
|
|
|
cd $(dirname $0)
|
|
|
|
|
pwd
|
|
|
|
|
)
|
|
|
|
|
COMMIT_SHA=$(git rev-parse --short HEAD)
|
|
|
|
|
VERSION=$(git describe --tags)
|
|
|
|
|
ASSETS="false"
|
|
|
|
@ -19,22 +22,16 @@ debugInfo () {
|
|
|
|
|
buildAssets() {
|
|
|
|
|
cd $REPO
|
|
|
|
|
rm -rf assets/build
|
|
|
|
|
rm -f statik/statik.go
|
|
|
|
|
|
|
|
|
|
export CI=false
|
|
|
|
|
|
|
|
|
|
cd $REPO/assets
|
|
|
|
|
|
|
|
|
|
yarn --update-checksums
|
|
|
|
|
yarn install
|
|
|
|
|
yarn run build
|
|
|
|
|
|
|
|
|
|
if ! [ -x "$(command -v statik)" ]; then
|
|
|
|
|
export CGO_ENABLED=0
|
|
|
|
|
go get github.com/rakyll/statik
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
cd $REPO
|
|
|
|
|
statik -src=assets/build/ -include=*.html,*.js,*.json,*.css,*.png,*.svg,*.ico,*.ttf -f
|
|
|
|
|
cd build
|
|
|
|
|
rm -rf *.map
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildBinary() {
|
|
|
|
@ -86,8 +83,8 @@ release(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
usage() {
|
|
|
|
|
echo "Usage: $0 [-a] [-c] [-b] [-r]" 1>&2;
|
|
|
|
|
exit 1;
|
|
|
|
|
echo "Usage: $0 [-a] [-c] [-b] [-r]" 1>&2
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
while getopts "bacr:d" o; do
|
|
|
|
|