Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions tools/bump-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ if [ "${VERSION}" = "${CURRENT}" ]; then
echo "Changelog already at ${VERSION}."
else
# dch identity: prefer the package maintainer (single source of truth in
# debian/control). Setting DEBNAME/DEBEMAIL keeps dch non-interactive --
# without them dch prints warnings and waits for a keypress, which would
# hang unattended builds.
# debian/control). Setting DEBFULLNAME/DEBEMAIL keeps dch non-interactive
# (it takes the name from DEBFULLNAME, not DEBNAME) -- without them dch
# prints warnings and waits for a keypress, which would hang unattended
# builds.
MAINTAINER="$(sed -nE 's/^Maintainer:[[:space:]]*(.*)$/\1/p' "${ROOT}/debian/control" | head -n1)"
EMAIL_RE='<([^>]+)>'
if [[ "${MAINTAINER}" =~ ${EMAIL_RE} ]]; then
NAME="${MAINTAINER%% <}*"
NAME="${MAINTAINER%%" <"*}"
EMAIL="${BASH_REMATCH[1]}"
else
NAME="$(git -C "${ROOT}" config user.name || echo maintainer)"
EMAIL="$(git -C "${ROOT}" config user.email || echo maintainer@example.com)"
fi
DEBNAME="${NAME}" DEBEMAIL="${EMAIL}" \
DEBFULLNAME="${NAME}" DEBEMAIL="${EMAIL}" \
dch --distribution noble -v "${VERSION}" \
"Bumped to rolling version ${VERSION}."
fi
Loading