diff options
author | Chris Johns <chrisj@rtems.org> | 2017-08-07 09:59:49 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2017-08-07 09:59:49 +1000 |
commit | 8b96e17c8abf61d97dd224b23370dc148f32fe3c (patch) | |
tree | e8eb043159d145ffbbbf9c23ef872226de5ab059 /source-builder/sb/markdown/__version__.py | |
parent | 4.12: Fix SIS patch URL (diff) | |
download | rtems-source-builder-8b96e17c8abf61d97dd224b23370dc148f32fe3c.tar.bz2 |
doc: Remove in source documentation and the asciidoc package
The RSB documentation is now in ReST format and part of the RTEMS
Documentation project. See https://docs.rtems.org/.
Remove support for the GPL based asciidoc tool and remove the
asciidoc package from the RSB.
Add the Python Markdown package and update the reporter to use
Markdown for HTML generation. The resuling HTML report is a single
self contained file.
Closes #3047.
Diffstat (limited to 'source-builder/sb/markdown/__version__.py')
-rw-r--r-- | source-builder/sb/markdown/__version__.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/source-builder/sb/markdown/__version__.py b/source-builder/sb/markdown/__version__.py new file mode 100644 index 0000000..56b4260 --- /dev/null +++ b/source-builder/sb/markdown/__version__.py @@ -0,0 +1,30 @@ +# +# markdown/__version__.py +# +# version_info should conform to PEP 386 +# (major, minor, micro, alpha/beta/rc/final, #) +# (1, 1, 2, 'alpha', 0) => "1.1.2.dev" +# (1, 2, 0, 'beta', 2) => "1.2b2" +version_info = (2, 6, 8, 'final', 0) + + +def _get_version(): + " Returns a PEP 386-compliant version number from version_info. " + assert len(version_info) == 5 + assert version_info[3] in ('alpha', 'beta', 'rc', 'final') + + parts = 2 if version_info[2] == 0 else 3 + main = '.'.join(map(str, version_info[:parts])) + + sub = '' + if version_info[3] == 'alpha' and version_info[4] == 0: + # TODO: maybe append some sort of git info here?? + sub = '.dev' + elif version_info[3] != 'final': + mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'} + sub = mapping[version_info[3]] + str(version_info[4]) + + return str(main + sub) + + +version = _get_version() |