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

[fix] fix release.sh regex patterns

parent ab66bb53
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#__version__ = '0.20.1dev9'
current=`grep -P "__version__ = \'\d+.\d+.\d+(\w*)\'" duniterpy/__init__.py | grep -oP "\d+.\d+.\d+(\w*)"`
current=`grep -P "__version__ = \"\d+.\d+.\d+(\w*)\"" duniterpy/__init__.py | grep -oP "\d+.\d+.\d+(\w*)"`
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__ = \"$current\"/__version__ = \"$1\"/g" duniterpy/__init__.py
# 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
......
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