Skip to content

Commit

Permalink
Update upload.sh
Browse files Browse the repository at this point in the history
Fix deployment symlink.
  • Loading branch information
pefribeiro authored Jun 21, 2022
1 parent 1a55992 commit 3a2489a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a2489a

Please sign in to comment.