blueprints.git

commit 9a3477454c98b708cbe3087968d235704adc3b87

Author: Adam <git@apiote.xyz>

breezy-weather

 breezy-weather/Dockerfile | 15 +++++++++++++++
 breezy-weather/build.sh | 13 +++++++++++++


diff --git a/breezy-weather/Dockerfile b/breezy-weather/Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..ab0ea0275c9caf9c5d17c084eacc0f6e955cf8aa
--- /dev/null
+++ b/breezy-weather/Dockerfile
@@ -0,0 +1,15 @@
+FROM mobiledevops/android-sdk-image
+USER root
+WORKDIR /root
+RUN mkdir .ssh
+COPY ssh_key .ssh/id_ed25519
+COPY known_hosts .ssh/known_hosts
+COPY android.jks android.jks
+COPY keystore_pass keystore_pass
+COPY key_pass key_pass
+COPY build.sh build.sh
+RUN chmod 755 build.sh
+RUN chmod -R a+rX /root/android.jks
+RUN chmod -R a+rX /root/keystore_pass
+RUN chmod -R a+rX /root/key_pass
+ENTRYPOINT ["./build.sh"]




diff --git a/breezy-weather/build.sh b/breezy-weather/build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..8dda9b65becfaae49eb6e56d4f230421edf7c5e3
--- /dev/null
+++ b/breezy-weather/build.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -ex
+
+item="$1"
+
+git clone --branch apiote --single-branch --depth 1 https://git.apiote.xyz/git/breezy-weather.git
+cd breezy-weather
+commit=$(git show --pretty=oneline --abbrev-commit --name-only | head -n1 | cut -d ' ' -f 1)
+./gradlew assembleStandardRelease
+buildTools=$(ls /opt/android-sdk-linux/build-tools | sort -V | tail -n1)
+"/opt/android-sdk-linux/build-tools/$buildTools/apksigner" sign -ks "/root/android.jks" --ks-pass "file:/root/keystore_pass" --ks-key-alias weather --key-pass "file:/root/key_pass" app/build/outputs/apk/standard/release/app-standard-arm64-v8a-release-unsigned.apk
+scp app/build/outputs/apk/standard/release/app-standard-arm64-v8a-release-unsigned.apk "deploy@host.containers.internal:toys/czwek/${item}/BreezyWeather-${commit}"