forked from STMicroelectronics/STBLESensor_Android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateRelease.sh
More file actions
executable file
·40 lines (28 loc) · 1.05 KB
/
createRelease.sh
File metadata and controls
executable file
·40 lines (28 loc) · 1.05 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
32
33
34
35
36
37
38
39
40
#! /bin/bash
export PATH=~/Library/Android/sdk/build-tools/28.0.3/:$PATH
versionName=$1
cd BlueSTSDK
git tag $versionName
git push --tags origin
cd ..
cd BlueSTSDK_Gui_Android
git tag $versionName
git push --tags origin
cd ..
cd BlueSTSDK_Analytics
git tag $versionName
git push --tags origin
cd ..
cd trilobytelib
git tag $versionName
git push --tags origin
cd ..
git tag $versionName
git push --tags origin
mkdir ../$versionName
zip -r ../$versionName/src_$versionName.zip . -x '*.git*' '*build/*' '*.gradle/*' '*release*'
./gradlew assembleRelease
cp BlueMS/build/outputs/apk/release/BlueMS-release-unsigned.apk ../$versionName/$versionName-unsigned.apk
zipalign -v -p 4 ../$versionName/$versionName-unsigned.apk ../$versionName/$versionName-unsigned-aligned.apk
apksigner sign --v1-signing-enabled --v2-signing-enabled --ks myreleasekey.jks --ks-key-alias MyReleaseKey --ks-pass pass:password --out ../$versionName/$versionName-release.apk --in ../$versionName/$versionName-unsigned-aligned.apk
apksigner verify ../$versionName/$versionName-release.apk