Skip to content

Commit 0f9da1e

Browse files
Merge pull request #262 from smswithoutborders/dev
update: should begin testing
2 parents 0313925 + 3bcfa80 commit 0f9da1e

2 files changed

Lines changed: 66 additions & 3 deletions

File tree

build_sign.sh

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
MIN_SDK=24
5+
github_url="https://api.github.com/repos/smswithoutborders/SMSWithoutBorders-App-Android/releases"
6+
7+
python3 -m venv venv
8+
{
9+
source venv/bin/activate
10+
pip install -r requirements.txt
11+
./bump_version.py "$(git symbolic-ref HEAD)"
12+
}
13+
14+
tagVersion=$(sed -n '5p' version.properties | cut -d "=" -f 2)
15+
label=$(sed -n '4p' version.properties | cut -d "=" -f 2)
16+
branch=$(git symbolic-ref HEAD | cut -d "/" -f 3)
17+
track=$(python3 track.py "$branch")
18+
19+
git tag -f "${tagVersion}"
20+
21+
./gradlew clean assembleRelease
22+
apksigner sign --ks app/keys/app-release-key.jks \
23+
--ks-pass pass:"$1" \
24+
--in app/build/outputs/apk/release/app-release-unsigned.apk \
25+
--out apk-outputs/"$label".apk
26+
27+
./gradlew clean assembleRelease
28+
apksigner sign --ks app/keys/app-release-key.jks \
29+
--ks-pass pass:"$1" \
30+
--in app/build/outputs/apk/release/app-release-unsigned.apk \
31+
--out app/build/outputs/apk/release/"$label".apk
32+
33+
# This will now stop the script immediately if diffoscope fails
34+
diffoscope apk-outputs/"$label".apk app/build/outputs/apk/release/"$label".apk
35+
rm apk-outputs/"$label".apk
36+
37+
./gradlew assemble bundleRelease
38+
apksigner sign --ks app/keys/app-release-key.jks \
39+
--ks-pass pass:"$1" \
40+
--in app/build/outputs/bundle/release/app-release.aab \
41+
--out app/build/outputs/bundle/release/app-bundle.aab \
42+
--min-sdk-version "$MIN_SDK"
43+
44+
git push origin "$branch"
45+
git push --tag
46+
47+
python3 -m venv venv
48+
{
49+
source venv/bin/activate
50+
pip install -r requirements.txt
51+
python3 release.py \
52+
--version_code "${tagVersion}" \
53+
--version_name "${label}" \
54+
--description "<b>Release</b>: ${label}<br><b>Build No</b>: ${tagVersion}<br><b>shasum</b>: $(shasum apk-outputs/${label}.apk)" \
55+
--branch "${branch}" \
56+
--track "${track}" \
57+
--app_bundle_file app/build/outputs/bundle/release/app-bundle.aab \
58+
--app_apk_file app/build/outputs/apk/release/"${label}".apk \
59+
--status "completed" \
60+
--platforms "all" \
61+
--github_url "${github_url}"
62+
}
63+

version.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
releaseVersion=0
22
stagingVersion=31
3-
nightlyVersion=0
4-
versionName=0.31.0
5-
tagVersion=77
3+
nightlyVersion=6
4+
versionName=0.31.6
5+
tagVersion=75

0 commit comments

Comments
 (0)