Skip to content

Commit

Permalink
Merge pull request #221 from null-a/docs-tweaks
Browse files Browse the repository at this point in the history
Grab version/release from package.json.
  • Loading branch information
stuhlmueller committed Sep 24, 2015
2 parents 26caa85 + cf4eda6 commit 193ef57
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import sys
import os
import shlex
import json

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

Expand Down Expand Up @@ -61,10 +62,12 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
with open('../package.json') as f:
pkg = json.load(f)
# The short X.Y version.
version = '0.1.1'
version = pkg['version']
# The full version, including alpha/beta/rc tags.
release = '0.1.1'
release = pkg['version']

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
10 changes: 2 additions & 8 deletions docs/development/npm.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
Updating the npm package
========================

1. Update version in ``docs/conf.py``::
1. Update version in dev::

git checkout dev
# Edit `version = ...` and `release = ...` in conf.py
git add conf.py
git commit -m "Update version in conf.py"

2. Update version in ``package.json``::

npm version patch // or minor, or major (needs to match version above)
npm version patch // or minor, or major; prints new version number

2. Merge into master::

Expand Down

0 comments on commit 193ef57

Please sign in to comment.