osmith submitted this change.
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(-)
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
To view, visit change 42535. To unsubscribe, or for help writing mail filters, visit settings.