Browse Source

scripts: do not upload branches as main continious prerelease

pull/2/head
Alibek Omarov 3 years ago
parent
commit
654bac83a5
  1. 30
      scripts/continious_upload.sh

30
scripts/continious_upload.sh

@ -83,6 +83,35 @@ if [ ! -z "$UPLOADTOOL_SUFFIX" ] ; then @@ -83,6 +83,35 @@ if [ ! -z "$UPLOADTOOL_SUFFIX" ] ; then
fi
fi
else
if [ "$GITHUB_ACTIONS" = "true" ]; then
if [ "$GITHUB_REF_TYPE" == "branch" ]; then
if [ "$GITHUB_REF_NAME" == "master" ]; then
RELEASE_NAME="continuous"
RELEASE_TITLE="Continuous build"
else
RELEASE_NAME="continuous-$GITHUB_REF_NAME"
RELEASE_TITLE="Continuous build ($GITHUB_REF_NAME)"
fi
if [ -z "$UPLOADTOOL_ISPRERELEASE" ]; then
is_prerelease="false"
else
is_prerelease="true"
fi
elif [ "$GITHUB_REF_TYPE" == "tag" ]; then
case $(tr '[:upper:]' '[:lower:]' <<< "$GITHUB_REF_NAME") in
*-alpha*|*-beta*|*-rc*)
RELEASE_NAME="$GITHUB_REF_NAME"
RELEASE_TITLE="Pre-release build ($GITHUB_REF_NAME)"
is_prerelease="true"
;;
*)
RELEASE_NAME="$GITHUB_REF_NAME"
RELEASE_TITLE="Release build ($GITHUB_REF_NAME)"
is_prerelease="false"
;;
esac
fi
else
# ,, is a bash-ism to convert variable to lower case
case $(tr '[:upper:]' '[:lower:]' <<< "$GIT_TAG") in
@ -108,6 +137,7 @@ else @@ -108,6 +137,7 @@ else
;;
esac
fi
fi
# Do not upload non-master branch builds
if [ "$GITHUB_EVENT_NAME" == "pull_request" ] ; then

Loading…
Cancel
Save