diff --git a/FDROID-UPDATE.md b/FDROID-UPDATE.md deleted file mode 100644 index e13dc559..00000000 --- a/FDROID-UPDATE.md +++ /dev/null @@ -1,141 +0,0 @@ -# Updating TrackerControl on F-Droid - -TrackerControl's WireGuard engine is compiled from Rust source. New F-Droid -build entries must prepare the pinned Rust toolchain and Cargo dependencies -before Gradle invokes Cargo in locked, offline mode. - -The examples below use release `2026072701` / `2026.07.27`. Substitute the -actual version code and version name for later releases. - -## 1. Tag the release - -Only tag a commit that includes the current `rust-toolchain.toml`, -`wgbridge-rs/Cargo.lock`, and `scripts/setup_rust_android.sh` files. -`rust-toolchain.toml` is authoritative for the Rust version, profile, and -Android targets; the setup script installs that specification. - -```bash -git tag 2026072701 -git push origin 2026072701 -``` - -TrackerControl's F-Droid metadata uses numeric tags as release identifiers. - -## 2. Prepare an fdroiddata merge request - -Fork [fdroid/fdroiddata](https://gitlab.com/fdroid/fdroiddata), then clone the -fork and create a branch: - -```bash -git clone https://gitlab.com/YOUR_USERNAME/fdroiddata.git -cd fdroiddata -git remote add upstream https://gitlab.com/fdroid/fdroiddata.git -git fetch upstream master -git switch -c trackercontrol-2026072701 upstream/master -``` - -Edit: - -```text -metadata/net.kollnig.missioncontrol.fdroid.yml -``` - -Append this entry under `Builds:`: - -```yaml - - versionName: 2026.07.27-fdroid - versionCode: 2026072701 - commit: '2026072701' - subdir: app - sudo: - - apt-get update - - apt-get install -y rustup gcc libc-dev - gradle: - - fdroid - prebuild: - - ../scripts/setup_rust_android.sh - ndk: r27c -``` - -Update the current-version fields at the bottom of the file: - -```yaml -CurrentVersion: 2026.07.27-fdroid -CurrentVersionCode: 2026072701 -``` - -Keep the automatic-update configuration unchanged: - -```yaml -AutoUpdateMode: Version -UpdateCheckMode: Tags ^[0-9]+$ -``` - -## 3. Validate the metadata - -With `fdroidserver` installed and available on `PATH`, run from the -`fdroiddata` checkout: - -```bash -fdroid readmeta -fdroid lint net.kollnig.missioncontrol.fdroid -``` - -For an end-to-end local application check, provision the pinned Rust and -Gradle dependencies while networking is available, then build the release -offline: - -```bash -./scripts/setup_rust_android.sh -./gradlew :app:dependencies :app:prefetchAndroidLintDependencies \ - --no-daemon --no-configuration-cache -# AGP resolves AAPT2 lazily when generating the locale config, so cache it -# before verifying the release build in offline mode. -./gradlew :app:generateFdroidReleaseLocaleConfig \ - --no-daemon --no-configuration-cache -./gradlew :app:assembleFdroidRelease --offline \ - --no-build-cache --no-configuration-cache --no-daemon -``` - -The APK should contain `libwgbridge.so` for `armeabi-v7a`, `arm64-v8a`, `x86`, -and `x86_64`. - -## 4. Submit the metadata change - -From the `fdroiddata` checkout: - -```bash -git add metadata/net.kollnig.missioncontrol.fdroid.yml -git commit -m "Update TrackerControl to 2026072701" -git push origin trackercontrol-2026072701 -``` - -Open a merge request from that branch into `fdroid/fdroiddata:master`. - -Suggested merge-request description: - -```text -TrackerControl now builds its WireGuard engine from Rust source. - -The prebuild step installs the repository-pinned Rust toolchain, Android -targets, and cargo-ndk, and fetches Cargo.lock dependencies. The Gradle build -itself runs Cargo with --locked --offline. - -Locally verified with: -./gradlew :app:assembleFdroidRelease --offline --no-build-cache \ - --no-configuration-cache --no-daemon -``` - -## If the update bot opens a merge request first - -The checkupdates bot normally copies the previous build recipe, which does not -contain the Rust preparation steps. Its source branch belongs to F-Droid's bot -fork and may not be editable by the TrackerControl maintainers. - -Create the complete merge request from the TrackerControl maintainer's own -`fdroiddata` fork as described above. Comment on the bot merge request with a -link to the replacement and ask F-Droid's maintainers to close the bot merge -request in favor of it. - -F-Droid's general contribution guide is available at -. diff --git a/scripts/build_and_sign.sh b/scripts/build_and_sign.sh index eee5fb0f..e002a3be 100755 --- a/scripts/build_and_sign.sh +++ b/scripts/build_and_sign.sh @@ -39,6 +39,7 @@ require_command() { readonly TAG=$1 readonly REQUESTED_RUN_ID=${2:-} [[ $TAG =~ ^[0-9]+$ ]] || fail "release tag must be numeric: $TAG" +readonly FASTLANE_CHANGELOG="$ROOT/fastlane/metadata/android/en-US/changelogs/$TAG.txt" require_command gh require_command git @@ -167,6 +168,14 @@ printf 'signing_certificate_sha256=%s\n' "$ACTUAL_CERT_SHA256" \ printf 'workflow_run=%s\n' "$RUN_URL" >> "$OUTPUT_BUILD_INFO" printf 'Creating draft GitHub release %s...\n' "$TAG" +RELEASE_NOTES='Download the latest version [here](https://github.com/TrackerControl/tracker-control-android/releases/latest/download/TrackerControl-githubRelease-latest.apk).' +if [[ -s $FASTLANE_CHANGELOG ]]; then + printf 'Including Fastlane changelog: %s\n' "$FASTLANE_CHANGELOG" + RELEASE_NOTES+=$'\n\n' + RELEASE_NOTES+=$(<"$FASTLANE_CHANGELOG") +else + printf 'No Fastlane changelog found for %s; using generated release notes only.\n' "$TAG" +fi gh release create "$TAG" \ "$SIGNED_APK" \ "$SIGNED_SUMS" \ @@ -175,7 +184,8 @@ gh release create "$TAG" \ --verify-tag \ --draft \ --generate-notes \ - --title "$TAG" + --notes "$RELEASE_NOTES" \ + --title "Version $TAG" printf '\nSigned APK: %s\n' "$SIGNED_APK" printf 'A draft release was created. Test the APK, then publish it in GitHub.\n'