blueprints.git

commit 72b77fc54c7607b272c622fa367ae107063c99b5

Author: Adam Evyčędo <git@apiote.xyz>

czwek can build master without tag

 czwek/build.sh | 6 ++++--


diff --git a/czwek/build.sh b/czwek/build.sh
index ac2b7b72a86ffa7af2fbc8527cbf0c8723f53f6d..7945acf80e00c862cb480940245f5873aca3d149 100755
--- a/czwek/build.sh
+++ b/czwek/build.sh
@@ -6,9 +6,11 @@ item="$1"
 
 git clone --branch master https://git.apiote.xyz/git/Bimba.git
 cd Bimba
-tag=$(git tag | sort -V | tail -n1)
-git switch -d "$tag"
 ./gradlew assembleRelease
+if ! git show --format='%d' | head -n1 | grep -q tag; then
+  exit 0
+fi
+tag=$(git tag | sort -V | tail -n1)
 buildTools=$(ls /root/sdk/build-tools | sort -V | tail -n1)
 "/root/sdk/build-tools/$buildTools/apksigner" sign --ks "/root/android.jks" --ks-pass "file:/root/keystore_pass" --ks-key-alias bimba --key-pass "file:/root/key_pass" --in app/build/outputs/apk/release/app-release-unsigned.apk --out app/build/outputs/apk/release/app-release-signed.apk
 if [ "${ENVIRONMENT:-production}" = 'production' ]; then