From 8a624563db882112274ae9366e4ce1b01476b833 Mon Sep 17 00:00:00 2001 From: Tom Cooks Date: Mon, 16 Nov 2026 11:01:40 -0500 Subject: Fix the F-Droid update script and record MR 57687 --- FDROID.md | 11 +++++++---- tools/update-fdroid.sh | 7 +++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/FDROID.md b/FDROID.md index eeea4f1..d00d4c9 100644 --- a/FDROID.md +++ b/FDROID.md @@ -49,10 +49,13 @@ everything around the F-Droid submission that is not in the code. returns 200. - fdroiddata metadata: `f-droid/com.tomcooks.reccoon.yml` now lists the `1.1.2` / versionCode 4 build and sets `CurrentVersion: 1.1.2`. -- **F-Droid MR: not opened yet.** The saved token in `~/.config/gitlab-token` - returned `401 invalid_token` (expired). Renew an `api`-scoped token, save it, - then run `./tools/update-fdroid.sh`; it opens the MR against - `fdroid/fdroiddata`. +- **F-Droid MR:** + (opened 2026-11-16). The first attempt, !57686, conflicted because the fork + was still at an old `master`; the fork was synced with upstream and the + branch recreated. The MR now only adds the 1.1.2 build entry and bumps + `CurrentVersion`. Waiting for the maintainers to trigger the pipeline. +- A message was posted on the MR asking for the pipeline/review. No pipeline + has been scheduled yet. ## Signing key — DO NOT LOSE diff --git a/tools/update-fdroid.sh b/tools/update-fdroid.sh index 3500348..6aeed73 100755 --- a/tools/update-fdroid.sh +++ b/tools/update-fdroid.sh @@ -84,12 +84,11 @@ curl -s -o /dev/null -H "PRIVATE-TOKEN: $TOKEN" -X POST \ "$API/projects/$FORK_ID/repository/branches?branch=$BRANCH&ref=$FORK_BRANCH" || true echo "==> Writing $FILE_PATH" -CONTENT="$(cat "$SOURCE_YAML")" LAST_COMMIT="" LAST_COMMIT="$(gl "$API/projects/$FORK_ID/repository/files/$FILE_PATH_ENC?ref=$BRANCH" \ | jq -r '.last_commit_id // empty' 2>/dev/null || true)" -BODY="$(jq -n --arg b "$BRANCH" --arg c "$CONTENT" --arg m "Update RECCoon to $VERSION" \ - --arg l "$LAST_COMMIT" \ +BODY="$(jq -n --arg b "$BRANCH" --rawfile c "$SOURCE_YAML" \ + --arg m "Update RECCoon to $VERSION" --arg l "$LAST_COMMIT" \ '{branch:$b, content:$c, commit_message:$m} + (if $l == "" then {} else {last_commit_id:$l} end)')" if [ -n "$LAST_COMMIT" ]; then CODE="$(curl -s -o /tmp/fdroid-file.json -w '%{http_code}' \ @@ -107,7 +106,7 @@ if [ "$CODE" != "200" ] && [ "$CODE" != "201" ]; then fi echo "==> Checking for an existing merge request" -EXISTING="$(gl "$API/projects/$FORK_ID/merge_requests?source_branch=$BRANCH&state=opened" \ +EXISTING="$(gl "$API/projects/$UPSTREAM_ID/merge_requests?source_branch=$BRANCH&state=opened&author_username=$USERNAME" \ | jq -r '.[0].web_url // empty')" if [ -n "$EXISTING" ]; then echo " already open: $EXISTING" -- cgit v1.2.3