Skip to content

Commit

Permalink
About to release v0.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bjodah committed May 20, 2019
1 parent 9e70a0c commit 188b599
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions scripts/generate_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
NARGS=$#
PKG=$(find . -maxdepth 2 -name __init__.py -print0 | xargs -0 -n1 dirname | xargs basename)
AUTHOR=$(head -n 1 AUTHORS)
sphinx-apidoc --full --force -A "$AUTHOR" --module-first --doc-version=$(python3 setup.py --version) -F -o doc $PKG/ $(find . -type d -name tests)
sphinx-apidoc --full --force -A "$AUTHOR" --module-first --doc-version=$(python setup.py --version) -F -o doc $PKG/ $(find . -type d -name tests)
#sed -i 's/Contents/.. include:: ..\/README.rst\n\nContents/g' doc/index.rst
#echo ".. include:: ../README.rst" >>doc/index.rst
cat <<EOF >>doc/index.rst
Overview
========
$(tail -n+3 README.rst)
EOF
sed -i "s/'sphinx.ext.viewcode',/'sphinx.ext.viewcode',\n 'sphinx.ext.autosummary',\n 'numpydoc',/g" doc/conf.py
MATCH="'sphinx.ext.viewcode'"
NEW="'sphinx.ext.viewcode',\n 'sphinx.ext.autosummary',\n 'numpydoc'"
sed -i "s/$MATCH/$NEW/g" doc/conf.py
sed -i "s/alabaster/sphinx_rtd_theme/g" doc/conf.py
if [[ $NARGS -eq 3 ]]; then
cat <<EOF>>doc/conf.py
Expand Down
4 changes: 2 additions & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -xeu
# Usage:
#
# $ ./scripts/release.sh v1.2.3 ~/anaconda2/bin myserver.example.com GITHUB_USER GITHUB_REPO
# $ ./scripts/release.sh v1.2.3 myserver.example.com GITHUB_USER GITHUB_REPO
#

if [[ $1 != v* ]]; then
Expand All @@ -26,7 +26,7 @@ export PYTHONPATH=$(pwd)
./scripts/run_tests.sh
env ${PKG_UPPER}_RELEASE_VERSION=v$VERSION python3 setup.py sdist
#python3 -m pip install --user -e .[docs]
env ${PKG_UPPER}_RELEASE_VERSION=v$VERSION ./scripts/generate_docs.sh $4 ${5:-$PKG} v$VERSION
env ${PKG_UPPER}_RELEASE_VERSION=v$VERSION ./scripts/generate_docs.sh

# All went well, add a tag and push it.
git tag -a v$VERSION -m v$VERSION
Expand Down

0 comments on commit 188b599

Please sign in to comment.