Android-Password-Store/release/deploy-github.sh
Harsh Shandilya ff3d2fcce3
release: script improvements (#915)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2020-07-03 07:03:17 +02:00

12 lines
412 B
Bash
Executable file

#!/usr/bin/env bash
set -ex
trap 'exit 1' SIGINT SIGTERM
[ -z "$(command -v hub)" ] && { echo "hub not installed; aborting!"; exit 1; }
[ -z "${1}" ] && { echo "No tag specified!"; exit 1; }
prev_ref="$(git rev-parse --abbrev-ref HEAD)"
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"