osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/42535?usp=email )
Change subject: OBS: nightly: add ".0" after versions on git tags ......................................................................
OBS: nightly: add ".0" after versions on git tags
Fix that with the current logic of generating version numbers for nightly, a version done on a tag can be higher than the following version:
on tag: 1.14.0.202603231800 on tag (with this patch): 1.14.0.0.202603231800 next commit after the tag: 1.14.0.1.abcd.202603241800
Fixes: OS#6981 Change-Id: Id140d8ea76bf98357711587a9909d54097250fd6 --- M scripts/obs/lib/srcpkg.py 1 file changed, 6 insertions(+), 0 deletions(-)
Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py index b3e0422..8ed50df 100644 --- a/scripts/obs/lib/srcpkg.py +++ b/scripts/obs/lib/srcpkg.py @@ -106,6 +106,12 @@ if ":" in ret: ret = ret.split(":")[1]
+ # Nightly: add a ".0" after the version if the current commit is on a + # version tag, so the next version is higher (OS#6981) + if lib.args.feed == "nightly": + while ret.count(".") < 3: + ret += ".0" + # Append the conflict_version to increase the version even if the commit # did not change (OS#5135) conflict_version = lib.args.conflict_version