[Openstack-operators] Operations project: Packaging
fungi at yuggoth.org
Thu Nov 20 01:05:42 UTC 2014
On 2014-11-19 21:25:49 +0000 (+0000), Kris G. Lindgren wrote:
> PBR when working off of a branch uses the git hash of the commit for the
> version of the package. So you will get a version name like
> The behavior that I would change is to allow you to override the the
> setting of the version to the git hash. How? I don¹t really care -
> I could even work with a text file for the override.
Building an sdist on the tip of python-novaclient master branch
gives me a version of 126.96.36.199.gae0890a where the most recent tag
was 2.20.0 and the current commit (ae0890a) is the 58th since that
tag. Since it increments the dev subcomponent (always the fourth
position) by commit count after the most recent tag, isn't that
sufficient to keep versions monotonic (at least in non-pathological
examples, yes releasing out of parallel branches with the most
recent tag in common would still be full of fail)?
Optionally, something hackish like...
export PBR_VERSION=`git describe|sed 's/-\([0-9]\+\)-g[0-9a-f]\+$/.\1/'`
...if you want to not have the git SHA appended, though I still
don't see that it either helps or hinders monotony.
But yes, I agree that it's currently lacking in more knobs for
tweaking the version generation algorithm. I think once the last of
lifeless's current semver/PEP-440 oriented improvements are
polished it might be possible to increase flexibility there. To that
end, I've opened a bug for it. Thanks!
More information about the OpenStack-operators