From bbf8acbda9c0d5105888756fdfef1002d99f280f Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Tue, 10 Dec 2024 17:23:43 +0100 Subject: [PATCH] fix(linux): pushing of updated changelog branch This fixes the `upload-to-debian.sh` script if the `chore/linux/changelog` branch was created a while back while the base branch moved in the meantime. In this case we have to use `--force` instead of `--force-with-lease` otherwise `git` gets confused. This is save to do since the intention is that we replace the previous commit and we know that there is (should be) only one commit on the `chore/linux/changelog` branch. --- linux/scripts/upload-to-debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/scripts/upload-to-debian.sh b/linux/scripts/upload-to-debian.sh index 85472a4ed19..7fd844dd845 100755 --- a/linux/scripts/upload-to-debian.sh +++ b/linux/scripts/upload-to-debian.sh @@ -99,7 +99,7 @@ function push_to_github_and_create_pr() { local PR_BODY=$4 if [[ -n "${PUSH}" ]]; then - ${NOOP} git push --force-with-lease origin "${BRANCH}" + ${NOOP} git push --force origin "${BRANCH}" PR_NUMBER=$(gh pr list --draft --search "${PR_TITLE}" --base "${BASE}" --json number --jq '.[].number') if [[ -n ${PR_NUMBER} ]]; then builder_echo "PR #${PR_NUMBER} already exists"