summaryrefslogtreecommitdiffstats
path: root/default.signed.zip.do
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2023-04-21 23:50:38 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2023-04-21 23:50:38 +0100
commit16a36c812fabda812ecf3aaa7f12fa6f44c66b2e (patch)
treeccae60abf8301ae451cfa1f21c33b8a62d5306cf /default.signed.zip.do
parentdb091bfd1db36ab66340ccad2eb7b6393a0aa3da (diff)
downloadandroid-jetpack-compose-redo-master.tar.gz
android-jetpack-compose-redo-master.tar.xz
android-jetpack-compose-redo-master.zip
Jetpack Compose and materialHEADmaster
Diffstat (limited to 'default.signed.zip.do')
-rwxr-xr-xdefault.signed.zip.do14
1 files changed, 14 insertions, 0 deletions
diff --git a/default.signed.zip.do b/default.signed.zip.do
new file mode 100755
index 0000000..32f7c3f
--- /dev/null
+++ b/default.signed.zip.do
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+set -e
+src=${1%.signed.zip}.apk
+redo-ifchange .vars.rc "$src"
+. ./.vars.rc
+if [[ $KEYSTORE_PASS =~ ^file: ]]; then redo-ifchange "${KEYSTORE_PASS#file:}"; fi
+redo-ifchange "$BUILD_TOOLS/apksigner" "$KEYSTORE"
+tmp=$(mktemp -d)
+trap 'rm -rf "$tmp"' EXIT
+"$BUILD_TOOLS/apksigner" sign --ks "$KEYSTORE" --ks-pass "$KEYSTORE_PASS" \
+ "${APKSIGNER_SIGN_ARGS[@]}" --out "$tmp/app.apk" "$src"
+7z a -tzip "$tmp/app.zip" "$tmp/app.apk" "$tmp/app.apk.idsig" >/dev/null
+mv "$tmp/app.zip" "$3"
+# vim:ft=bash