Skip to content

Commit 432248c

Browse files
committed
Add version environment variable
1 parent 6d70291 commit 432248c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/docker-compose.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ services:
77
context: ../
88
args:
99
- PACKAGE
10-
image: ${PACKAGE}-docs
10+
image: ${PACKAGE}_python-docs
1111
environment:
1212
- PACKAGE
1313
- UPSTREAM_REPO
1414
- MODE
15+
- PATCH_VERSION
1516
volumes:
1617
- ..:/main
1718
user: ${HOST_UID}:anaconda
@@ -22,6 +23,7 @@ services:
2223
- -c
2324
- |
2425
set -e
26+
export PATCH_VERSION=$$(cat /main/$${PACKAGE}/version.py | grep -oE '\d+\.\d+\.[a-z0-9]+')
2527
if echo "$${MODE}" | grep -i live &>/dev/null; then
2628
mkdocs serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80
2729
elif echo "$${MODE}" | grep -iE "qa|build" &>/dev/null; then

docs/mkdocs.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ theme:
5151
name: Switch to light mode
5252
plugins:
5353
- search
54-
- redirects:
55-
redirect_maps:
56-
"index.md": "getting-started/index.md"
5754
- mkdocstrings:
5855
default_handler: python
5956
handlers:
@@ -97,6 +94,7 @@ markdown_extensions:
9794
class: mermaid
9895
format: !!python/name:pymdownx.superfences.fence_code_format
9996
extra:
97+
PATCH_VERSION: !ENV PATCH_VERSION
10098
generator: false # Disable watermark
10199
version:
102100
provider: mike

0 commit comments

Comments
 (0)