Skip to content

Commit e41bbc3

Browse files
author
Sebastian Kippe
authored
Merge pull request #1115 from remotestorage/feature/automate_documentation_version
Update documentation version when bumping release version
2 parents 59a7205 + 0506e97 commit e41bbc3

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

doc/conf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
# add these directories to sys.path here. If the directory is relative to the
1616
# documentation root, use os.path.abspath to make it absolute, like shown here.
1717
#
18-
# import os
19-
# import sys
20-
# sys.path.insert(0, os.path.abspath('.'))
18+
import os
19+
import sys
20+
sys.path.insert(0, os.path.abspath('.'))
2121

22+
from version import __version__
2223

2324
# -- General configuration ------------------------------------------------
2425

@@ -66,9 +67,9 @@
6667
# built documents.
6768
#
6869
# The short X.Y version.
69-
version = '1.0.0-alpha7'
70+
version = __version__
7071
# The full version, including alpha/beta/rc tags.
71-
release = '1.0.0-alpha7'
72+
release = __version__
7273

7374
# The language for content autogenerated by Sphinx. Refer to documentation
7475
# for a list of supported languages.

doc/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '1.0.2'

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
"dev": "webpack -w",
1919
"doc": "cd doc; sphinx-autobuild -i '*~' -i '*.sw*' -i '#*#' . _build/html",
2020
"preversion": "npm test",
21-
"version": "npm run build && git add release/ && npm run update-bower-version && git add bower.json",
21+
"version": "npm run build && git add release/ && npm run update-bower-version && git add bower.json && npm run update-doc-version && git add doc/version.py",
2222
"postversion": "git push && git push --tags",
2323
"update-bower-version": "bash scripts/update-bower-version.sh",
24+
"update-doc-version": "bash scripts/update-doc-version.sh",
2425
"autobuild-docs": "cd doc && sphinx-autobuild . _build/html"
2526
},
2627
"devDependencies": {

scripts/update-doc-version.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
set -e
3+
4+
echo "__version__ = '$(node -p "var config = require('./package.json'); config.version")'" > doc/version.py

0 commit comments

Comments
 (0)