Commit 49393ef2 authored by Vincent Texier's avatar Vincent Texier

[enh] enhance release.sh to update documentation version

parent 6cefb0b4
......@@ -64,17 +64,17 @@ master_doc = 'index'
# General information about the project.
project = 'duniterpy'
copyright = '2015, caner & inso'
author = 'caner & inso'
copyright = '2019, caner & inso & vit'
author = 'caner & inso & vit'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.51.0'
version = '0.52.0'
# The full version, including alpha/beta/rc tags.
release = '0.51.0'
release = '0.52.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -5,8 +5,13 @@ current=`grep -P "__version__ = \'\d+.\d+.\d+(\w*)\'" duniterpy/__init__.py
echo "Current version: $current"
if [[ $1 =~ ^[0-9]+.[0-9]+.[0-9]+[0-9a-z]*$ ]]; then
# update version in duniterpy
sed -i "s/__version__ = '$current'/__version__ = '$1'/g" duniterpy/__init__.py
git commit duniterpy/__init__.py -m "$1"
# update version in documentation configuration
sed -i "s/version = '$current'/version = '$1'/g" docs/conf.py
sed -i "s/release = '$current'/release = '$1'/g" docs/conf.py
# commit changes and add version tag
git commit duniterpy/__init__.py docs/conf.py -m "$1"
git tag "$1" -a -m "$1"
else
echo "Wrong version format"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment