Files
IronFox/scripts/ci-build.sh
celenity 444ab875d1 IronFox v147.0
ironfox-oss/IronFox!115
____

## Changes

- [Added an OLED theme](7008b9c865).
- Enable content process isolation by default.
    - **NOTE**: This may cause issues with live streaming on certain websites *(such as `rumble.com`)*. If desired, at the cost of security, you can disable content process isolation by navigating to `Settings` -> `About` -> `About IronFox`, tapping the IronFox logo 7 times, navigating back to `Secret settings`, disabling the setting to enable content process isolation, and restarting your browser.
- Created and integrated a new separate [`UnifiedPush-AC`](https://gitlab.com/ironfox-oss/unifiedpush-ac) component to support UnifiedPush functionality.
- Implemented support for Gecko localizations *(ex. for `about:` pages)*.
- [Prevented exposing the browser name and vendor to extensions](8fa2ceaa9c) to improve privacy and resolve compatibility issues with certain extensions.
- Updated to Firefox [`147.0`](https://firefox.com/firefox/android/147.0/releasenotes/).
- Other tweaks, enhancements, and refinements.

MR-author: celenity <celenity@celenity.dev>
Co-authored-by: Weblate <hosted@weblate.org>
Co-authored-by: Akash Yadav <itsaky01@gmail.com>
Co-authored-by: techaddict <20232669-techaddict@users.noreply.gitlab.com>
Co-authored-by: user <user@localhost.localdomain>
Approved-by: Akash Yadav <itsaky01@gmail.com>
Merged-by: celenity <celenity@celenity.dev>
2026-01-13 21:21:00 +00:00

88 lines
2.5 KiB
Bash
Executable File

#!/bin/bash
## This script is expected to be executed in a CI environment, or possibly in our Docker image instance
## DO NOT execute this manually!
set -eu
set -o pipefail
set -o xtrace
source "$(realpath $(dirname "$0"))/versions.sh"
case "${BUILD_VARIANT}" in
arm)
BUILD_TYPE='apk'
;;
x86_64)
BUILD_TYPE='apk'
;;
arm64)
BUILD_TYPE='apk'
;;
bundle)
BUILD_TYPE='bundle'
;;
*)
echo "Unknown build variant: '${BUILD_VARIANT}'." >&2
exit 1
;;
esac
if [[ "${CI_COMMIT_REF_NAME}" == "${PRODUCTION_BRANCH}" ]]; then
# Set uBO assets to production variant
export IRONFOX_UBO_ASSETS_URL="https://gitlab.com/ironfox-oss/assets/-/raw/main/uBlock/assets.${PRODUCTION_BRANCH}.json"
echo "Using uBO Assets: ${IRONFOX_UBO_ASSETS_URL}"
# Target release
export IRONFOX_RELEASE=1
echo "Preparing to build IronFox (Release)..."
fi
# Get sources
bash -x ./scripts/get_sources.sh
# Prepare sources
bash -x ./scripts/prebuild.sh "${BUILD_VARIANT}"
source "$(realpath $(dirname "$0"))/env_local.sh"
# Set the build date to the date of commmit to ensure that the
# MOZ_BUILDID is consistent across CI build jobs
export MOZ_BUILD_DATE="$(date -d "${CI_PIPELINE_CREATED_AT}" "+%Y%m%d%H%M%S")"
export IF_BUILD_DATE="${CI_PIPELINE_CREATED_AT}"
# Build
bash -x scripts/build.sh "${BUILD_TYPE}"
if [[ "${BUILD_TYPE}" == "apk" ]]; then
# Create GeckoView AAR archives
pushd "${IRONFOX_GECKO}"
MOZ_AUTOMATION=1 ./mach android archive-geckoview
popd
# Sign APK
APK_IN="${IRONFOX_OUTPUTS}/ironfox-${IRONFOX_CHANNEL}-${BUILD_VARIANT}-unsigned.apk"
APK_OUT="${APK_ARTIFACTS}/IronFox-v${IRONFOX_VERSION}-${IRONFOX_TARGET_ABI}.apk"
"${IRONFOX_ANDROID_SDK}/build-tools/${ANDROID_BUILDTOOLS_VERSION}/apksigner" sign \
--ks="${KEYSTORE}" \
--ks-pass="pass:${KEYSTORE_PASS}" \
--ks-key-alias="${KEYSTORE_KEY_ALIAS}" \
--key-pass="pass:${KEYSTORE_KEY_PASS}" \
--out="${APK_OUT}" \
"${APK_IN}"
fi
if [[ "${BUILD_TYPE}" == "bundle" ]]; then
# Build signed APK set
AAB_IN="$(ls "${IRONFOX_GECKO}"/obj/ironfox-${IRONFOX_CHANNEL}-${BUILD_VARIANT}/gradle/build/mobile/android/fenix/app/outputs/bundle/fenixRelease/*.aab)"
APKS_OUT="${APKS_ARTIFACTS}/IronFox-v${IRONFOX_VERSION}.apks"
"${IRONFOX_BUNDLETOOL}"/bundletool build-apks \
--bundle="${AAB_IN}" \
--output="${APKS_OUT}" \
--ks="${KEYSTORE}" \
--ks-pass="pass:${KEYSTORE_PASS}" \
--ks-key-alias="${KEYSTORE_KEY_ALIAS}" \
--key-pass="pass:${KEYSTORE_KEY_PASS}"
fi