-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathcreate-release.sh
More file actions
executable file
·31 lines (24 loc) · 1.02 KB
/
create-release.sh
File metadata and controls
executable file
·31 lines (24 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
set -e
[ "$1" = "-h" -o "$1" = "--help" ] && echo "
Usage: `basename $0` lastReleasedVersionCode nextReleaseTag [additionalReleaseTag]
Creates up to two releases with versionCodes incremented from lastReleasedVersionCode. The last
released version code will typically be the last version code published on the Play Store (beta
or production). Two releases are needed when a patch is needed to the last production release
and a beta is already ongoing for the next release.
" && exit
mkdir -p apks
rm -f apks/*
last_version_code=$1
git checkout $2
./gradlew clean
release_version_code=$((last_version_code + 1))
./gradlew assembleOdkCollectRelease -PversionCode=$release_version_code
cp collect_app/build/outputs/apk/odkCollectRelease/*.apk apks
if [[ $# -gt 2 ]]; then
git checkout $3
./gradlew clean
beta_version_code=$((release_version_code + 1))
./gradlew assembleOdkCollectRelease -PversionCode=$beta_version_code
cp collect_app/build/outputs/apk/odkCollectRelease/*.apk apks
fi
open apks