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 --- tools/update-fdroid.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools') 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