From 46416099c4d6e0a5f5fbc8fae72c3e81f99eab01 Mon Sep 17 00:00:00 2001 From: Nathan Sweet Date: Fri, 18 Jun 2021 20:16:25 -0400 Subject: [PATCH] [ts] Update build file. --- spine-ts/build.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/spine-ts/build.sh b/spine-ts/build.sh index 5b9ff093b..b51c72b6e 100755 --- a/spine-ts/build.sh +++ b/spine-ts/build.sh @@ -3,9 +3,9 @@ set -e if [ -z "$GITHUB_REF" ]; then - BRANCH=$(git symbolic-ref --short -q HEAD) + BRANCH=$(git symbolic-ref --short -q HEAD) else - BRANCH=${GITHUB_REF#refs/heads/} + BRANCH=${GITHUB_REF#refs/heads/} fi echo "Building spine-ts $BRANCH artifacts" @@ -17,11 +17,13 @@ tsc -p tsconfig.threejs.json tsc -p tsconfig.player.json ls build/*.js build/*.ts | awk '{print "unexpand -t 4 ", $0, " > /tmp/e; mv /tmp/e ", $0}' | sh + + if ! [ -z "$TS_UPDATE_URL" ] && ! [ -z "$BRANCH" ]; then - echo "Deploying spine-ts $BRANCH artifacts" - zip -j spine-ts.zip build/* player/css/spine-player.css player/example/external/* - curl -F "file=@spine-ts.zip" "$TS_UPDATE_URL$BRANCH" + echo "Deploying spine-ts $BRANCH artifacts" + zip -j spine-ts.zip build/* player/css/spine-player.css player/example/external/* + curl -F "file=@spine-ts.zip" "$TS_UPDATE_URL$BRANCH" else - echo "Not deploying artifacts. TS_UPDATE_URL and/or BRANCH not set." + echo "Not deploying artifacts. TS_UPDATE_URL and/or BRANCH not set." fi \ No newline at end of file