From e5fac2609f164b208b88c098ecc1a89d3b30b724 Mon Sep 17 00:00:00 2001 From: Armand <4831c0@proton.me> Date: Mon, 15 Sep 2025 12:25:49 +0200 Subject: [PATCH] Jenkins: move bundle compression to build_apk.sh --- Jenkinsfile | 26 -------------------------- tools/linux/build_apk.sh | 13 +++++++++++++ 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1ecd8fa..89114cd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -50,32 +50,6 @@ pipeline { } } - stage('Modify firka_bundle.dart') { - when { - branch 'main' - } - steps { - script { - sh '''#!/bin/sh - set -e - - BUNDLE_FILE="firka/lib/helpers/firka_bundle.dart" - - if [ -f "$BUNDLE_FILE" ]; then - echo "Modifying $BUNDLE_FILE" - sed -i 's/final bool _compressedBundle = false;/final bool _compressedBundle = Platform.isAndroid;/' "$BUNDLE_FILE" - echo "Modified _compressedBundle setting" - - grep "_compressedBundle" "$BUNDLE_FILE" || echo "Warning: _compressedBundle line not found after modification" - else - echo "$BUNDLE_FILE not found" - exit 1 - fi - ''' - } - } - } - stage('Build firka') { steps { sh 'bash -c "./tools/linux/build_apk.sh ' + env.BRANCH_NAME + '"' diff --git a/tools/linux/build_apk.sh b/tools/linux/build_apk.sh index 402c745..bec2e1c 100755 --- a/tools/linux/build_apk.sh +++ b/tools/linux/build_apk.sh @@ -31,6 +31,19 @@ build_abi() { rsync -a --exclude='build/' --exclude='.dart_tool/' --exclude='.git/' . "${temp_dir}/" cd "${temp_dir}" + + BUNDLE_FILE="lib/helpers/firka_bundle.dart" + + if [ -f "$BUNDLE_FILE" ]; then + echo "Modifying $BUNDLE_FILE" + sed -i 's/final bool _compressedBundle = false;/final bool _compressedBundle = Platform.isAndroid;/' "$BUNDLE_FILE" + echo "Modified _compressedBundle setting" + + grep "_compressedBundle" "$BUNDLE_FILE" || echo "Warning: _compressedBundle line not found after modification" + else + echo "$BUNDLE_FILE not found" + exit 1 + fi # Update version for this ABI update_version_for_abi ${build_offset} "."