Commit
bf3ef9d95af939d581f10f8a35e952e1a8131b21
by Oliver SmithOBS: --version-append: never override version
We have some branches set up that when pushed to, directly result in
building OBS packages. We append a string to the package version there,
such as ~rhizomatica.testing. The expectation is that all packages built
from that branch have this string in the version.
Recently an edge case was found: when amending the commit of the last
tagged release, e.g. osmo-sgsn 1.12.0, then the generated version is
based on the previous git tag (as the last git tag's commit is not part
of the current branch anymore) while having the newer version in
debian/changelog. This then results in the newer version being used,
without appending the version string:
osmo-sgsn: WARNING: version from changelog (1.12.0) is higher than
version based on git tag (1.11.1.20-e000e~rhizomatica.production),
using version from changelog (git tag not pushed yet?)
While IMHO it is a bad idea to just amend the commit of the last release
instead of making a separate commit, this results in unexpected behavior
so adjust the script to not override the version if --version-append is
used.
Related: OS#5981
Change-Id: I589ceb08b9e1ff2ccdd54e94216b25e1e40f22fe