From b25035e20b93024efa8a45cf3c0e245a8dd1dc4d Mon Sep 17 00:00:00 2001 From: Akash Yadav Date: Sun, 18 May 2025 01:49:55 +0530 Subject: [PATCH] fix: update env var names to better reflect their purpose Signed-off-by: Akash Yadav --- scripts/ci-build.sh | 4 ++-- scripts/ci-publish-packages.sh | 10 +++++----- scripts/ci-update-site.sh | 2 +- scripts/get_sources.sh | 4 ++-- scripts/patches.sh | 4 ++-- scripts/prebuild.sh | 8 ++++---- scripts/versions.sh | 13 +++++++------ 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/scripts/ci-build.sh b/scripts/ci-build.sh index 7b3be6cc..258e4406 100755 --- a/scripts/ci-build.sh +++ b/scripts/ci-build.sh @@ -77,7 +77,7 @@ if [[ "$BUILD_TYPE" == "apk" ]]; then # Sign APK APK_IN="$(ls "$fenix"/app/build/outputs/apk/fenix/release/*.apk)" - APK_OUT="$APK_ARTIFACTS/IronFox-v${FIREFOX_TAG}-${BUILD_ABI}.apk" + APK_OUT="$APK_ARTIFACTS/IronFox-v${FIREFOX_VERSION}-${BUILD_ABI}.apk" "$ANDROID_HOME/build-tools/35.0.0/apksigner" sign \ --ks="$KEYSTORE" \ --ks-pass="pass:$KEYSTORE_PASS" \ @@ -90,7 +90,7 @@ fi if [[ "$BUILD_TYPE" == "bundle" ]]; then # Build signed APK set AAB_IN="$(ls "$fenix"/app/build/outputs/bundle/fenixRelease/*.aab)" - APKS_OUT="$APKS_ARTIFACTS/IronFox-v${FIREFOX_TAG}.apks" + APKS_OUT="$APKS_ARTIFACTS/IronFox-v${FIREFOX_VERSION}.apks" "$builddir"/bundletool build-apks \ --bundle="$AAB_IN" \ --output="$APKS_OUT" \ diff --git a/scripts/ci-publish-packages.sh b/scripts/ci-publish-packages.sh index 1cabb99c..54e4a014 100755 --- a/scripts/ci-publish-packages.sh +++ b/scripts/ci-publish-packages.sh @@ -16,7 +16,7 @@ upload_to_package_registry() { local file_name="$(basename "$file")" curl --header "PRIVATE-TOKEN: $GITLAB_CI_API_TOKEN" \ --upload-file "$file" \ - "$GENERIC_PACKAGES_URL/${package_name}/${FIREFOX_TAG}/${file_name}" + "$GENERIC_PACKAGES_URL/${package_name}/${FIREFOX_VERSION}/${file_name}" } export ARTIFACTS=$CI_PROJECT_DIR/artifacts @@ -41,7 +41,7 @@ upload_asset() { echo "$(sha256sum -b "$file" | cut -d ' ' -f 1) ${file_name}" >> "$CHECKSUMS_FILE" upload_to_package_registry "$file" "$package_name" - assets+=("{\"name\": \"$file_name\",\"url\": \"$GENERIC_PACKAGES_URL/${package_name}/${FIREFOX_TAG}/${file_name}\",\"link_type\": \"package\",\"direct_asset_path\": \"/${file_name}\"}") + assets+=("{\"name\": \"$file_name\",\"url\": \"$GENERIC_PACKAGES_URL/${package_name}/${FIREFOX_VERSION}/${file_name}\",\"link_type\": \"package\",\"direct_asset_path\": \"/${file_name}\"}") } # Upload packages to package registry @@ -56,7 +56,7 @@ for apks in "$APKS_ARTIFACTS"/*.apks; do done { - changelog_file="$CI_PROJECT_DIR/changelogs/${FIREFOX_TAG}.md" + changelog_file="$CI_PROJECT_DIR/changelogs/${FIREFOX_VERSION}.md" if [[ -f "$changelog_file" ]]; then cat "$changelog_file" fi @@ -75,8 +75,8 @@ done { echo "---" - echo "name: IronFox v${FIREFOX_TAG}" - echo "tag-name: v${FIREFOX_TAG}" + echo "name: IronFox v${FIREFOX_VERSION}" + echo "tag-name: v${FIREFOX_VERSION}" echo "description: |" awk '{print " " $0}' < "$RELEASE_NOTES_FILE" echo "assets-link:" diff --git a/scripts/ci-update-site.sh b/scripts/ci-update-site.sh index d7f8f9dd..ed2b4555 100644 --- a/scripts/ci-update-site.sh +++ b/scripts/ci-update-site.sh @@ -14,7 +14,7 @@ cd target-repo || { echo "Unable to cd into target-repo"; exit 1; }; ./scripts/gen_patch_pages.py ../scripts/patches.yaml # Update version name -sed -i "s/IRONFOX_VERSION = .*/IRONFOX_VERSION = \"${FIREFOX_TAG}\";/g" \ +sed -i "s/IRONFOX_VERSION = .*/IRONFOX_VERSION = \"${FIREFOX_VERSION}\";/g" \ ./src/version.ts # Commit changes diff --git a/scripts/get_sources.sh b/scripts/get_sources.sh index 6122ff9a..ce19791f 100755 --- a/scripts/get_sources.sh +++ b/scripts/get_sources.sh @@ -178,8 +178,8 @@ clone_repo "https://github.com/mozilla/application-services" "$APPSERVICESDIR" " (cd "$APPSERVICESDIR" && git submodule update --init --depth=1) # Download Firefox Source -download_and_extract "gecko" "https://archive.mozilla.org/pub/firefox/${FIREFOX_RELEASE_PATH}/source/firefox-${FIREFOX_TAG}.source.tar.xz" -#download_and_extract "gecko" "https://github.com/mozilla-firefox/firefox/archive/refs/tags/${FIREFOX_TAG_NAME}.tar.gz" +download_and_extract "gecko" "https://archive.mozilla.org/pub/firefox/${FIREFOX_RELEASE_PATH}/source/firefox-${FIREFOX_VERSION}.source.tar.xz" +#download_and_extract "gecko" "https://github.com/mozilla-firefox/firefox/archive/refs/tags/${FIREFOX_RELEASE_TAG}.tar.gz" # Write env_local.sh echo "Writing ${ENV_SH}..." diff --git a/scripts/patches.sh b/scripts/patches.sh index d2877861..045f5e51 100644 --- a/scripts/patches.sh +++ b/scripts/patches.sh @@ -97,10 +97,10 @@ rebase_patch() { { git checkout release || git reset --hard && git checkout release; } && { git checkout -b "$name_slug" || git checkout "$name_slug" && git reset --hard; } && - git reset --hard "$FIREFOX_TAG_NAME" && + git reset --hard "$FIREFOX_RELEASE_TAG" && git apply --3way "$rootdir/patches/$name" && git add . && - git commit --signoff -m "fix(patches): update '$name' for '$FIREFOX_TAG_NAME'" && + git commit --signoff -m "fix(patches): update '$name' for '$FIREFOX_RELEASE_TAG'" && git rebase release && git format-patch HEAD^1 --output="$rootdir/patches/$name" && git checkout release && diff --git a/scripts/prebuild.sh b/scripts/prebuild.sh index e7bc367d..172cb2fd 100755 --- a/scripts/prebuild.sh +++ b/scripts/prebuild.sh @@ -72,8 +72,8 @@ JAVA_VER=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}' | awk -F '.' ' exit 1 } -if [[ -z "$FIREFOX_TAG" ]]; then - echo "\$FIREFOX_TAG is not set! Aborting..."] +if [[ -z "$FIREFOX_VERSION" ]]; then + echo "\$FIREFOX_VERSION is not set! Aborting..."] exit 1 fi @@ -129,7 +129,7 @@ sed -i \ -e 's|applicationId "org.mozilla"|applicationId "org.ironfoxoss"|' \ -e 's|applicationIdSuffix ".firefox"|applicationIdSuffix ".ironfox"|' \ -e 's|"sharedUserId": "org.mozilla.firefox.sharedID"|"sharedUserId": "org.ironfoxoss.ironfox.sharedID"|' \ - -e "s/Config.releaseVersionName(project)/'${FIREFOX_TAG}'/" \ + -e "s/Config.releaseVersionName(project)/'${FIREFOX_VERSION}'/" \ app/build.gradle sed -i \ -e '/android:targetPackage/s/org.mozilla.firefox/org.ironfoxoss.ironfox/' \ @@ -329,7 +329,7 @@ popd pushd "$application_services" # Break the dependency on older A-C -sed -i -e "/android-components = /s/135\.0\.1/${FIREFOX_TAG}/" gradle/libs.versions.toml +sed -i -e "/android-components = /s/135\.0\.1/${FIREFOX_VERSION}/" gradle/libs.versions.toml echo "rust.targets=linux-x86-64,$rusttarget" >>local.properties sed -i -e '/NDK ez-install/,/^$/d' libs/verify-android-ci-environment.sh sed -i -e '/content {/,/}/d' build.gradle diff --git a/scripts/versions.sh b/scripts/versions.sh index 90059e55..c8d1381c 100644 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -1,13 +1,14 @@ #!/bin/bash +# shellcheck disable=SC2034 # Sources -FIREFOX_TAG="138.0.3" -FIREFOX_TAG_NAME="FIREFOX_${FIREFOX_TAG//./_}_RELEASE" -FIREFOX_RELEASE_PATH="releases/${FIREFOX_TAG}" -#FIREFOX_TAG_NAME="FIREFOX-ANDROID_${FIREFOX_TAG//./_}_RELEASE" +FIREFOX_VERSION="138.0.3" +FIREFOX_RELEASE_TAG="FIREFOX_${FIREFOX_VERSION//./_}_RELEASE" +FIREFOX_RELEASE_PATH="releases/${FIREFOX_VERSION}" +#FIREFOX_RELEASE_TAG="FIREFOX-ANDROID_${FIREFOX_VERSION//./_}_RELEASE" #FIREFOX_RC_BUILD_NAME="build1" -#FIREFOX_TAG_NAME="FIREFOX_${FIREFOX_TAG//./_}_${FIREFOX_RC_BUILD_NAME^^}" -#FIREFOX_RELEASE_PATH="candidates/${FIREFOX_TAG}-candidates/${FIREFOX_RC_BUILD_NAME}" +#FIREFOX_RELEASE_TAG="FIREFOX_${FIREFOX_VERSION//./_}_${FIREFOX_RC_BUILD_NAME^^}" +#FIREFOX_RELEASE_PATH="candidates/${FIREFOX_VERSION}-candidates/${FIREFOX_RC_BUILD_NAME}" WASI_TAG="wasi-sdk-20" GLEAN_TAG="v63.1.0" GMSCORE_TAG="v0.3.7.250932"