Skip to content

Commit ad37472

Browse files
committed
use the UMF version from git describe in docs, not the harcoded one
1 parent 00999df commit ad37472

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.github/workflows/reusable_docs_build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ jobs:
3535
echo "$PATH" >> $GITHUB_PATH
3636
python3 -m pip install -r third_party/requirements.txt
3737
38+
- name: Get UMF version
39+
run: |
40+
VERSION=$(git describe --tags --abbrev=0 | grep -oP '\d+\.\d+\.\d+')
41+
echo "UMF_VERSION=$VERSION" >> $GITHUB_ENV
42+
3843
- name: Build the documentation
3944
run: |
4045
cmake -B build \

RELEASE_STEPS.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ Do changes for a release:
3939
- For major/minor release start from the `main` branch
4040
- Add an entry to ChangeLog, remember to change the day of the week in the release date
4141
- For major releases mention API and ABI compatibility with the previous release
42-
- Update project's version in a few places:
43-
- For major and minor releases: `UMF_VERSION_CURRENT` in `include/umf/base.h` (the API version)
44-
- `release` variable in `docs/config/conf.py` (for docs)
42+
- For major and minor releases, update `UMF_VERSION_CURRENT` in `include/umf/base.h` (the API version)
4543
- For major releases update ABI version in `.map` and `.def` files
4644
- These files are defined for all public libraries (`libumf` and `proxy_lib`, at the moment)
4745
- Commit these changes and tag the release:

docs/config/conf.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
13
# Configuration file for the Sphinx documentation builder.
24
#
35
# This file only contains a selection of the most common options. For a full
@@ -22,8 +24,12 @@
2224
author = "Intel"
2325

2426
# The full version, including alpha/beta/rc tags
25-
release = "0.11.0"
26-
27+
release = os.getenv("UMF_VERSION", "")
28+
print(
29+
f"UMF_VERSION: {release}"
30+
if release != ""
31+
else "please set UMF_VERSION environment variable before running this script"
32+
)
2733

2834
# -- General configuration ---------------------------------------------------
2935

0 commit comments

Comments
 (0)