Files
IronFox/scripts/ci-update-fdroid.sh
celenity 870c6342f3 IronFox v146.0.1
ironfox-oss/IronFox!112
____

## Changes

- [Enabled memory tagging](e24a24e63c) *(via [Android's Arm Memory Tagging Extension](https://developer.android.com/ndk/guides/arm-mte))* to improve security for supported devices *(such as the Pixel 8 and newer)*.
- [Fixed an issue with Obtainium app installation](6026d6524f).
- Updated Bundletool to [`1.18.3`](https://github.com/google/bundletool/releases/tag/1.18.3).
- Updated to Firefox [`146.0.1`](https://firefox.com/firefox/android/146.0.1/releasenotes/).
- Updated microG to [`v0.3.11.250932`](https://github.com/microg/GmsCore/releases/tag/v0.3.11.250932).
- Updated Rust to [`1.92.0`](https://releases.rs/docs/1.92.0/).
- [Various tweaks, fixes, and refinements - especially to the build process](https://gitlab.com/ironfox-oss/IronFox/-/merge_requests/112/diffs).

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>
2025-12-19 16:16:28 +00:00

48 lines
1.7 KiB
Bash

#!/bin/bash
# Script is used to update the F-Droid repository
# This script is expected to be run in a CI environment
# DO NOT execute this manually!
set -eu
git clone --recurse-submodules "https://$IF_CI_USERNAME:$GITLAB_CI_PUSH_TOKEN@gitlab.com/$FDROID_REPO_PATH.git" fdroid
pushd fdroid || { echo "Unable to pushd into 'fdroid'"; exit 1; };
mkdir -vp "$REPO_DIR_PATH"
git lfs install
# Download all assets from the release
curl --header "PRIVATE-TOKEN: $GITLAB_CI_API_TOKEN" \
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases/${CI_COMMIT_TAG}/assets/links" \
| jq -c '.[] | select(.name | endswith(".apk"))' \
| while read -r asset; do
name=$(echo "$asset" | jq -r '.name')
url=$(echo "$asset" | jq -r '.direct_asset_url')
echo "Downloading $name from $url"
curl -L --header "PRIVATE-TOKEN: $GITLAB_CI_API_TOKEN" "$url" -o "$REPO_DIR_PATH/$name"
done
IFS=":" read -r vercode vername <<< "$("$CI_PROJECT_DIR"/scripts/get_latest_version.py $(ls "$REPO_DIR_PATH"/*.apk))"
META_FILE_PATH="$META_DIR_PATH/$META_FILE_NAME"
sed -i \
-e "s/CurrentVersion: .*/CurrentVersion: \"v$vername\"/" \
-e "s/CurrentVersionCode: .*/CurrentVersionCode: $vercode/" "$META_FILE_PATH"
pushd "$META_DIR_PATH" || { echo "Unable to pushd into '$META_DIR_PATH'"; exit 1; }
# Update metadata repository
git add "$META_FILE_NAME"
git commit -m "feat: update for release ${CI_COMMIT_TAG}"
git push origin "HEAD:$META_REPO_BRANCH"
popd || { echo "Unable to popd from '$META_DIR_PATH'"; exit 1; }
# Update F-Droid repository
git add "$REPO_DIR_PATH" "$META_DIR_PATH"
git commit -m "feat: update for release ${CI_COMMIT_TAG}"
git push origin "HEAD:$FDROID_REPO_BRANCH"
popd # ignore error