From 2fd1fa385abc2ae21c5a709ad4aa3012c09cd744 Mon Sep 17 00:00:00 2001
From: Vincent Texier <vit@free.fr>
Date: Sat, 5 Dec 2020 18:04:00 +0100
Subject: [PATCH] [doc] Improve regex to update the documentation version

Can handle subversion not tagged in dev branch
---
 release.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/release.sh b/release.sh
index 0c8934bd..84c40696 100755
--- a/release.sh
+++ b/release.sh
@@ -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"
-- 
GitLab