diff options
author | Oliver Smith <osmith@sysmocom.de> | 2021-02-26 08:38:20 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2021-02-26 11:53:53 +0100 |
commit | b76811b1da65dee41bde6154b2cb97d30fa46337 (patch) | |
tree | a53df2d0d58842be2b89fba104d2dc9a6eef3f23 /osmo-release.sh | |
parent | e75fa1e2ec0211312af68ae0f1001a7034d911b7 (diff) |
osmo-release.sh: support epoch
Related: OS#5046
Change-Id: I5d9d18d7cc84f185222ee176e6546bb3553a3598
Diffstat (limited to 'osmo-release.sh')
-rwxr-xr-x | osmo-release.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/osmo-release.sh b/osmo-release.sh index eea17cf9..c0b0b4a7 100755 --- a/osmo-release.sh +++ b/osmo-release.sh @@ -247,7 +247,24 @@ if [ -f "TODO-RELEASE" ]; then git add TODO-RELEASE fi -gbp dch --debian-tag='%(version)s' --auto --meta --git-author --multimaint-merge --ignore-branch --new-version="$NEW_VER" +# Add missing epoch (OS#5046) +DEB_VER=$(head -1 debian/changelog | cut -d ' ' -f 2 | sed 's,(,,' | sed 's,),,') +NEW_VER_WITH_EPOCH="$NEW_VER" +case "$DEB_VER" in +*:*) + epoch="$(echo "$DEB_VER" | cut -d: -f1)" + NEW_VER_WITH_EPOCH="$epoch:$NEW_VER" + ;; +esac + +gbp dch \ + --debian-tag='%(version)s' \ + --auto \ + --meta \ + --git-author \ + --multimaint-merge \ + --ignore-branch \ + --new-version="$NEW_VER_WITH_EPOCH" dch -r -m --distribution "unstable" "" git add ${GIT_TOPDIR}/debian/changelog bumpversion --current-version $VERSION $REL --tag --commit --tag-name $NEW_VER --allow-dirty |