Skip to content

Commit

Permalink
Merge pull request #12818 from keymanapp/fix/linux/uploadDebian
Browse files Browse the repository at this point in the history
fix(linux): pushing of updated changelog branch
  • Loading branch information
ermshiperete authored Dec 11, 2024
2 parents f2becb8 + 7010e41 commit a14c200
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
6 changes: 0 additions & 6 deletions linux/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ keyman (17.0.279-1) unstable; urgency=medium

-- Eberhard Beilharz <[email protected]> Thu, 29 Feb 2024 19:17:08 +0100

keyman (17.0.274-2) UNRELEASED; urgency=medium

* Add libicu-dev dependency to libkeymancore-dev (closes: #1064915)

-- Eberhard Beilharz <[email protected]> Wed, 28 Feb 2024 17:54:58 +0100

keyman (17.0.274-1) unstable; urgency=medium

* Fix autopkg tests
Expand Down
2 changes: 1 addition & 1 deletion linux/scripts/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ for proj in ${projects}; do
EXTRA_ARGS="--distribution ${DIST} --force-distribution"
fi
# shellcheck disable=SC2086
dch --newversion "${version}-${DEBREVISION-1}" ${EXTRA_ARGS} "Re-release to Debian"
dch --newversion "${version}-${DEBREVISION-1}" ${EXTRA_ARGS} ""
debuild -d -S -sa -Zxz
cd "${BASEDIR}"
done
15 changes: 10 additions & 5 deletions linux/scripts/upload-to-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,19 @@ function get_latest_stable_branch_name() {
echo "${stable_branch##* }"
}

# Push the changelog changes to GitHub and create a PR. Returns the PR#
# in the environment variable PR_NUMBER.
function push_to_github_and_create_pr() {
local BRANCH=$1
local BASE=$2
local PR_TITLE=$3
local PR_BODY=$4
local BRANCH=$1 # `chore/linux/changelog` or `chore/linux/cherry-pick/changelog`
local BASE=$2 # stable branch, `beta` or `master`
local PR_TITLE=$3 # `Update debian changelog`
local PR_BODY=$4 # `@keymanapp-test-bot skip`

if [[ -n "${PUSH}" ]]; then
${NOOP} git push --force-with-lease origin "${BRANCH}"
# Push to origin. We force push to reset the branch the commit we just made.
# There shouldn't be any other commits on ${BRANCH} except the one we want to replace
# (if any).
${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"
Expand Down

0 comments on commit a14c200

Please sign in to comment.