mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 01:40:12 +01:00
22 lines
823 B
Bash
22 lines
823 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
|
||
|
# assumes 2 env variables: KEYSTORE_FILE_HEX & KEYSTORE_PASSWORD
|
||
|
#
|
||
|
# PS. to turn file to hex and back:
|
||
|
# $ xxd -plain test.txt > test.hex
|
||
|
# $ xxd -plain -revert test.hex test2.txt
|
||
|
|
||
|
|
||
|
echo $KEYSTORE_FILE_HEX > bluewallet-release-key.keystore.hex
|
||
|
xxd -plain -revert bluewallet-release-key.keystore.hex > ./android/bluewallet-release-key.keystore
|
||
|
rm bluewallet-release-key.keystore.hex
|
||
|
|
||
|
cd android
|
||
|
TIMESTAMP=$(date +%s)
|
||
|
sed -i'.original' "s/versionCode 1/versionCode $TIMESTAMP/g" app/build.gradle
|
||
|
./gradlew assembleRelease
|
||
|
mv ./app/build/outputs/apk/release/app-release-unsigned.apk ./app/build/outputs/apk/release/app-release.apk
|
||
|
$ANDROID_HOME/build-tools/30.0.2/apksigner sign --ks ./bluewallet-release-key.keystore --ks-pass=pass:$KEYSTORE_PASSWORD ./app/build/outputs/apk/release/app-release.apk
|
||
|
|