summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2020-04-29 03:25:58 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2020-04-29 03:25:58 +0530
commitf9c310e93a6c4ac820779b052c3be40199d9bc9c (patch)
tree23624fcb3bf418bd8c86c3f62a7d9e6ad1682f21
parent4c3ccb42cd2c88ae8600f046435c38f5231625bb (diff)
release/deploy-github: add rudimentary checks for tag existence
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
-rwxr-xr-xrelease/deploy-github.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/release/deploy-github.sh b/release/deploy-github.sh
index 6fb3532d..62485e51 100755
--- a/release/deploy-github.sh
+++ b/release/deploy-github.sh
@@ -4,6 +4,14 @@ trap 'exit 1' SIGINT SIGTERM
[ -z "$(command -v hub)" ] && { echo "hub not installed; aborting!"; exit 1; }
[ -z "${1}" ] && { echo "No tag specified!"; exit 1; }
+found_tag=
+git tag -l | while read -r tag; do
+ if [ "$tag" == "${1}" ]; then
+ found_tag=true
+ break
+ fi
+done
+[ -z "${found_tag}" ] && { echo "Cannot find tag ${1} in the repository"; exit 1; }
prev_ref="$(git rev-parse --abbrev-ref HEAD)"
git checkout "${1}"
gradle clean bundleRelease assembleRelease