From 3a2489a911eb8b1187b5e91e02b06a3b920447f7 Mon Sep 17 00:00:00 2001 From: Pedro Ribeiro Date: Tue, 21 Jun 2022 11:21:04 +0100 Subject: [PATCH] Update upload.sh Fix deployment symlink. --- upload.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/upload.sh b/upload.sh index 33dae56..fea6959 100755 --- a/upload.sh +++ b/upload.sh @@ -5,20 +5,21 @@ url=${ROBOSTAR_WEB_USER}@${ROBOSTAR_WEB_HOST} file=$(ls $dir/features | grep -m 1 jar) version=${file#*_} version=${version%.jar} +BRANCH_NAME=${GITHUB_REF##*/} # Use the branch name to choose the name of the branch. This assumes # no branch of name 'update' will ever be used. -if [[ $WERCKER_GIT_BRANCH = master ]]; +if [[ $BRANCH_NAME = master ]]; then update=update else - update=$WERCKER_GIT_BRANCH + update=$BRANCH_NAME fi if [[ $version = *[!\ ]* ]]; then echo "Current version:" $version; - echo "Branch:" $WERCKER_GIT_BRANCH; + echo "Branch:" $BRANCH_NAME; dest=${update}_${version} echo "Target dir:" $dest; rm -rf tmp