From f75df5a7a82e87d65acb3366df226e0cc1adf098 Mon Sep 17 00:00:00 2001 From: Brain Date: Fri, 16 Sep 2022 15:30:48 +0200 Subject: [PATCH] Automatically determine version --- .drone.yml | 5 +++-- README.md | 6 ++++++ source/conf.py | 5 ++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index ff1b7a4..3038fd9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -32,8 +32,9 @@ steps: image: sphinxdoc/sphinx-latexpdf:5.0.2 commands: - apt-get update - - apt-get -y install texlive-lang-german rsync + - apt-get -y install texlive-lang-german rsync git - pip install -r requirements.txt + - export SPHINXOPTS="-D version=$(git -C source/handbuch describe --tags --abbrev=0) -D release=$(git -C source/handbuch describe --tags)" - make -j4 bundle - name: upload image: alpine @@ -55,6 +56,6 @@ steps: --- kind: signature -hmac: 7225cd21b9a1284bba09bd0f943e5873865f176e1dca49147ea8e309421e6726 +hmac: 797e2df88805ae1dee84d60ec024034965dcf41fc2ef86d5667adfdfe10b2719 ... diff --git a/README.md b/README.md index 93dc8de..6835f47 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,12 @@ The top level directory contains a Makefile, for generation with all output form make bundle ````` +In order to automatically determine the version string from the latest Git tag, execute the following command before calling `make`: + +``` +export SPHINXOPTS="-D version=$(git -C source/handbuch describe --tags --abbrev=0) -D release=$(git -C source/handbuch describe --tags)" +``` + The output files of the final handbook can be found in the subfolder `./bundle`. All generated intermediate artifacts and the final output files can be found in the `./build` subfolder. diff --git a/source/conf.py b/source/conf.py index 558ce57..4578149 100644 --- a/source/conf.py +++ b/source/conf.py @@ -24,7 +24,10 @@ copyright = '2021, diverse' author = 'Autorenkollektiv' # The full version, including alpha/beta/rc tags -release = '0.2.0' +release = '0.0.0' + +# The major project version, without alpha/beta/rc tags +version = '0.0.0' # -- General configuration --------------------------------------------------- -- 2.30.2