barectf: add pre-release version information (`barectf.__pre_version__`)
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 24 Sep 2020 20:01:25 +0000 (16:01 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 24 Sep 2020 21:46:31 +0000 (17:46 -0400)
This makes it possible to make a `-dev` or `-pre` version for example.

`barectf.__version__` contains the pre-release information.

The generated metadata stream gets a new `tracer_pre` environment entry
set to this value (empty string as of this patch).

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/__init__.py
barectf/config.py
barectf/version.py
tests/tracing/conftest.py

index c8a8766b12ab2ccc74c0f4d7edc22701a68c3103..533e96a184ff2352e4b10aef3b9784e6c014ea78 100644 (file)
@@ -33,6 +33,7 @@ import barectf.typing as barectf_typing
 __major_version__ = barectf_version.__major_version__
 __minor_version__ = barectf_version.__minor_version__
 __patch_version__ = barectf_version.__patch_version__
+__pre_version__ = barectf_version.__pre_version__
 __version__ = barectf_version.__version__
 
 
index 3983f90c94ff63f915b5f39a468e3a182f560c10..7f454a164892d11909865cd5dc6a98ae498d1012 100644 (file)
@@ -797,6 +797,7 @@ class Trace:
             ('tracer_major', barectf_version.__major_version__),
             ('tracer_minor', barectf_version.__minor_version__),
             ('tracer_patch', barectf_version.__patch_version__),
+            ('tracer_pre', barectf_version.__pre_version__),
             ('barectf_gen_date', str(datetime.datetime.now().isoformat())),
         ])
 
index f4bdd421af62e613c6261083c3e2cfa3e28486b1..a899b869cdb5958f53bf399239052659b5e85951 100644 (file)
@@ -24,4 +24,5 @@
 __major_version__ = 2
 __minor_version__ = 3
 __patch_version__ = 1
-__version__ = '{}.{}.{}'.format(__major_version__, __minor_version__, __patch_version__)
+__pre_version__ = ''
+__version__ = f'{__major_version__}.{__minor_version__}.{__patch_version__}{__pre_version__}'
index 4477b7ed644929bcc6a314b60e6a408c22d06a6d..bc5930fbb321496060acfb4d89d75e1b61840811 100644 (file)
@@ -133,6 +133,7 @@ class _YamlItem(pytest.Item):
             'tracer_major =',
             'tracer_minor =',
             'tracer_patch =',
+            'tracer_pre =',
         ]
 
         for line in lines:
This page took 0.025608 seconds and 4 git commands to generate.