Repo created
This commit is contained in:
parent
893a13f448
commit
a787ef3a2f
7 changed files with 629 additions and 2 deletions
21
common.sh
Executable file
21
common.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
export SCRIPT_DIR=$(realpath $(dirname $0))
|
||||
|
||||
replace() {
|
||||
export org=$2 new=$3
|
||||
find $1 -type f -exec sed -i 's@'$org'@'$new'@g' {} \;
|
||||
}
|
||||
|
||||
set_keys() {
|
||||
mkdir -p $SCRIPT_DIR/keys
|
||||
echo $LOCAL_TEST_JKS | base64 -d > $SCRIPT_DIR/keys/local.properties
|
||||
echo $STORE_TEST_JKS | base64 -d > $SCRIPT_DIR/keys/test.jks
|
||||
unset LOCAL_TEST_JKS
|
||||
unset STORE_TEST_JKS
|
||||
}
|
||||
|
||||
sign_apk() {
|
||||
export apksigner=$(find $ANDROID_HOME/build-tools -name apksigner | sort | tail -n 1)
|
||||
source $SCRIPT_DIR/keys/local.properties
|
||||
$apksigner sign -verbose -ks $SCRIPT_DIR/keys/test.jks --ks-pass pass:$storePassword --key-pass pass:$keyPassword --ks-key-alias $keyAlias --out $2 $1 || exit 1
|
||||
rm -rf $SCRIPT_DIR/keys
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue