[Openstack] [oslo] Issues with pbr when building custom packages
    Jeremy Stanley 
    fungi at yuggoth.org
       
    Thu Jun  9 18:16:54 UTC 2016
    
    
  
On 2016-06-09 10:15:38 +1000 (+1000), Sam Morrison wrote:
> > On 9 Jun 2016, at 10:06 AM, Doug Hellmann <doug at doughellmann.com> wrote:
[...]
> > If you're doing your own packaging, how are you feeding the version
> > number into pbr? Via the environment variable?
> 
> We’re building it based on the output of `git describe`
> 
> We use 
> 
> GIT_DESCRIBE_VERSION_REGEX = re.compile(
>     r"""
>     ^v?(?P<major>\d+)\.
>     (?P<minor>\d+)
>     (?:\.(?P<patch>\d+(\.\d+){0,1})){0,1}
>     (?:-(?P<commits>\d+)
>     -g(?P<revision>[0-9a-f]+)){0,1}$""",
>     re.VERBOSE)
[...]
Note that you can just pass versions to PBR via the calling
environment, per
http://docs.openstack.org/developer/pbr/packagers.html#versioning
If yours is the NeCTAR packaging library I found (or is a fork
thereof), it looks like you're doing a lot of duplicative work for
things PBR can already handle like calculating patchsets since the
last tag and translating to suitable Debian package version numbers.
-- 
Jeremy Stanley
    
    
More information about the Openstack
mailing list