aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-02-26 08:38:20 +0100
committerOliver Smith <osmith@sysmocom.de>2021-02-26 11:53:53 +0100
commitb76811b1da65dee41bde6154b2cb97d30fa46337 (patch)
treea53df2d0d58842be2b89fba104d2dc9a6eef3f23
parente75fa1e2ec0211312af68ae0f1001a7034d911b7 (diff)
osmo-release.sh: support epoch
-rwxr-xr-xosmo-release.sh19
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