diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2020-05-24 16:26:45 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2020-05-24 16:26:45 +0530 |
commit | a973f888280962b84070eaa1bc611f708adfc117 (patch) | |
tree | 2036127969af519daeccfb895e1d36f4a9dfb111 /release/deploy-github.sh | |
parent | 0146b5ae94ab7c9a623bb5ef3f7b36ecef624e68 (diff) |
release/deploy-github: simplify tag checks
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'release/deploy-github.sh')
-rwxr-xr-x | release/deploy-github.sh | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/release/deploy-github.sh b/release/deploy-github.sh index 62485e51..2dca0e2d 100755 --- a/release/deploy-github.sh +++ b/release/deploy-github.sh @@ -4,16 +4,8 @@ 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}" +git checkout "${1}" || exit 1 gradle clean bundleRelease assembleRelease hub release create "${1}" -a app/build/outputs/apk/release/app-release.apk git checkout "$prev_ref" |