From 57d44c972ff8a66b5cfd12e9ff314b23cabf8971 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Wed, 23 Aug 2023 20:05:08 -0400 Subject: [PATCH] Update build script to create zips --- build.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 8193949..0ad2412 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,18 @@ #!/bin/bash # Convenience script -git fetch && git merge origin/main && git push; # Typically run after a PR to main, so bring dev up to date -rm ./build/app/outputs/flutter-apk/* 2>/dev/null; # Get rid of older builds if any -flutter build apk && flutter build apk --split-per-abi # Build (both split and combined APKs) +CURR_DIR="$(pwd)" +trap "cd "$CURR_DIR"" EXIT + +git fetch && git merge origin/main && git push # Typically run after a PR to main, so bring dev up to date +rm ./build/app/outputs/flutter-apk/* 2>/dev/null # Get rid of older builds if any +flutter build apk && flutter build apk --split-per-abi # Build (both split and combined APKs) for file in ./build/app/outputs/flutter-apk/*.sha1; do gpg --sign --detach-sig "$file"; done # Generate PGP signatures -rsync -r ./build/app/outputs/flutter-apk/ ~/Downloads/Obtainium-build/ # Dropoff in Downloads to allow for drag-drop into Flatpak Firefox \ No newline at end of file +rsync -r ./build/app/outputs/flutter-apk/ ~/Downloads/Obtainium-build/ # Dropoff in Downloads to allow for drag-drop into Flatpak Firefox +cd ~/Downloads/Obtainium-build/ # Make zips just in case (for in-comment uploads) +for apk in *.apk; do + PREFIX="$(echo "$apk" | head -c -5)" + zip "$PREFIX" "$PREFIX"* +done +mkdir -p zips +mv *.zip zips/