Skip to content
Snippets Groups Projects
Commit 49393ef2 authored by Vincent Texier's avatar Vincent Texier
Browse files

[enh] enhance release.sh to update documentation version

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