Skip to content

Commit 4d9e2a5

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

File tree

4 files changed

+26
-14
lines changed

4 files changed

+26
-14
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ if(Python3_FOUND)
766766
add_custom_target(
767767
docs
768768
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
769-
COMMAND ${Python3_EXECUTABLE}
769+
COMMAND UMF_VERSION=${UMF_CMAKE_VERSION} ${Python3_EXECUTABLE}
770770
${UMF_CMAKE_SOURCE_DIR}/docs/generate_docs.py
771771
COMMENT "Generate HTML documentation using Doxygen")
772772
endif()

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/README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# Documentation
22

3-
To generate HTML documentation run the `generate_docs.py` script from any sub-dir of the
4-
repository (most likely `build`) or enable and use build target 'docs' (see details below).
3+
To generate HTML documentation, run the `generate_docs.py` script from any sub-directory of the repository (most likely `build`).
4+
To display the proper version of UMF in the documentation title, set the `UMF_VERSION` variable before running the script.
5+
6+
```bash
7+
cd build
8+
$ UMF_VERSION=<your version, e.g. "0.12.1"> python ../docs/generate_docs.py
9+
```
10+
11+
Documentation can also be built using the build target 'docs' (see details below).
512

613
This script will create `./docs_build` sub-directory, where the intermediate and final files
714
will be created. HTML docs will be in the `./docs_build/generated/html` directory.
@@ -12,13 +19,14 @@ To run documentation generation via build target use CMake commands below.
1219
To enable this target, python executable (in required version) has to be found in the system.
1320

1421
```bash
15-
$ cmake -B build
16-
$ cmake --build build --target docs
22+
cmake -B build
23+
cmake --build build --target docs
1724
```
1825

1926
## Requirements
2027

2128
Script to generate HTML docs requires:
22-
* [Doxygen](http://www.doxygen.nl/) at least v1.9.1
23-
* [Python](https://www.python.org/downloads/) at least v3.8
24-
* and python pip requirements, as defined in `third_party/requirements.txt`
29+
30+
* [Doxygen](http://www.doxygen.nl/) at least v1.9.1
31+
* [Python](https://www.python.org/downloads/) at least v3.8
32+
* and python pip requirements, as defined in `third_party/requirements.txt`

docs/config/conf.py

Lines changed: 9 additions & 3 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
@@ -18,12 +20,16 @@
1820
# -- Project information -----------------------------------------------------
1921

2022
project = "Intel Unified Memory Framework"
21-
copyright = "2023-2024, Intel"
23+
copyright = "2023-2025, Intel"
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 used in docs: {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)