This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repro script: check argc at the start
- Loading branch information
Showing
2 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,39 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Which app would you like to build (type 'wallet' or 'verifier')?" | ||
if [[ $# -ne 1 ]]; then | ||
echo "Pass the path/to/store.apk as an argument!" | ||
exit 1 | ||
fi | ||
|
||
echo "Which app would you like to build ('wallet' or 'verifier')?" | ||
read appName | ||
|
||
echo Please enter KeystoreFile name: | ||
echo "Please enter the keystore filename:" | ||
read keystoreFile | ||
|
||
echo Please enter Keystore Password: | ||
echo "Please enter the keystore password:" | ||
read -s keystorePassword | ||
|
||
echo Please enter KeyAlias: | ||
echo "Please enter the keyAlias:" | ||
read keyAlias | ||
|
||
echo Please enter KeyAlias Password: | ||
echo "Please enter the keyAlias password:" | ||
read -s keyAliasPassword | ||
|
||
echo Please enter Build Timestamp: | ||
echo "Please enter the build timestamp:" | ||
read buildTimestamp | ||
|
||
#make sure we have a full clean build | ||
# Make sure we have a full clean build | ||
rm -rf $appName/build | ||
rm -rf .gradle | ||
|
||
echo "Building apk from source..." | ||
docker build -t covidcertificate-builder . | ||
currentPath=`pwd` | ||
docker run --rm -v $currentPath:/home/covidcertificate -w /home/covidcertificate covidcertificate-builder gradle $appName:assembleProdRelease -PkeystorePassword=$keystorePassword -PkeyAlias=$keyAlias -PkeyAliasPassword=$keyAliasPassword -PkeystoreFile=$keystoreFile -PbuildTimestamp=$buildTimestamp | ||
|
||
cp $appName/build/outputs/apk/prod/release/$appName-prod-release.apk $appName-built.apk | ||
|
||
if [[ $# -eq 1 ]] ; then | ||
echo Comparing the built APK with the reference: | ||
python apkdiff.py $appName-built.apk $1 | ||
fi | ||
echo "Comparing the APK built from source with the reference APK..." | ||
python apkdiff.py $appName-built.apk $1 |