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

[doc] Improve regex to update the documentation version

Can handle subversion not tagged in dev branch
parent b2f0eb7d
No related branches found
No related tags found
2 merge requests!128Release 0.62.0,!120[doc] Improve regex to update the documentation version
Pipeline #10354 waiting for manual action
......@@ -6,12 +6,12 @@ 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
sed -i "s/__version__ = \".*\"/__version__ = \"$1\"/g" duniterpy/__init__.py
# update version in pyproject.toml
poetry version "$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
sed -i "s/version = \".*\"/version = \"$1\"/g" docs/conf.py
sed -i "s/release = \".*\"/release = \"$1\"/g" docs/conf.py
# commit changes and add version tag
git commit pyproject.toml duniterpy/__init__.py docs/conf.py -m "$1"
git tag "$1" -a -m "$1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment