latesttag is not enough
After a merge from the stable branch to the main one, if .hgtags
was merged, then it's possible that hg log -r. -T {lattesttag}
returns the tag that has originally been set on the stable branch.
This is what happens in the build for !7 (merged), whose resulting Debian package version is 0.16.1-1%2B4hg.72b78dcde4f0
, instead of starting with the expected 0.17.0~~pre
Of course that can't happen for a tagged release.
We should filter more agressively (we already consider only those tags that start with heptapod-
), perhaps infering the wished prefix from the current content of HEPTAPOD_VERSION
.