Skip to content

Commit 7431058

Browse files
committed
Automated versioning added
1 parent b0e755f commit 7431058

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

docs/.docker/pip_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ mdx-truly-sane-lists
77
mkdocs-gen-files
88
mkdocs-literate-nav
99
mkdocs-exclude-search
10+
mkdocs-markdownextradata-plugin

docs/docker-compose.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ services:
1414
- PACKAGE
1515
- UPSTREAM_REPO
1616
- MODE
17-
- GOOGLE_ANALYTICS_KEY # ALSO THIS?
17+
- GOOGLE_ANALYTICS_KEY
18+
- PATCH_VERSION
1819
volumes:
1920
- ../docs:/main/docs
2021
- ../${PACKAGE}:/main/${PACKAGE}
@@ -27,6 +28,7 @@ services:
2728
- |
2829
git config --global --add safe.directory /main
2930
set -e
31+
export PATCH_VERSION=$$(cat /main/$${PACKAGE}/version.py | grep -oE '\d+\.\d+\.[a-z0-9]+')
3032
if echo "$${MODE}" | grep -i live &>/dev/null; then
3133
mkdocs serve --config-file ./docs/mkdocs.yaml -a 0.0.0.0:80
3234
elif echo "$${MODE}" | grep -iE "qa|push" &>/dev/null; then

docs/mkdocs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ theme:
8585
icon: material/brightness-4
8686
name: Switch to light mode
8787
plugins:
88+
- markdownextradata: {}
8889
- search
8990
# - redirects: # OPTIONAL REDIRECTS
9091
# redirect_maps:
@@ -121,6 +122,7 @@ markdown_extensions:
121122
- pymdownx.snippets
122123

123124
extra:
125+
PATCH_VERSION: !ENV PATCH_VERSION
124126
generator: false # Disable watermark
125127
analytics:
126128
provider: google

docs/src/citation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ If your work uses this Element, please cite the following manuscript and Researc
44

55
+ Yatsenko D, Nguyen T, Shen S, Gunalan K, Turner CA, Guzman R, Sasaki M, Sitonic D, Reimer J, Walker EY, Tolias AS. DataJoint Elements: Data Workflows for Neurophysiology. bioRxiv. 2021 Jan 1. doi: https://doi.org/10.1101/2021.03.30.437358
66

7-
+ DataJoint Elements ([RRID:SCR_021894](https://scicrunch.org/resolver/SCR_021894)) - Element Array Electrophysiology (version `<Enter version number>`)
7+
+ DataJoint Elements ([RRID:SCR_021894](https://scicrunch.org/resolver/SCR_021894)) - Element Array Electrophysiology (version {{ PATCH_VERSION }})

0 commit comments

Comments
 (0)