Skip to content

Commit fb8bba3

Browse files
committed
Release version 0.15.0
* Fix a problem in the `release.yml` file
1 parent bfd00e7 commit fb8bba3

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ jobs:
4949
id: version_check
5050
run: |
5151
BRANCH_VERSION="${{ env.VERSION }}"
52-
53-
# Safely extract __version__ from the file (for example, '1.0.0' from __version__ = '1.0.0')
54-
CODE_VERSION=$(grep '__version__' src/docbuild/__about__.py | awk -F "'" '{print $2}')
55-
52+
53+
# Safely extract __version__ from the file regardless of single or double quotes,
54+
# e.g. __version__ = '1.0.0' or __version__ = "1.0.0"
55+
CODE_VERSION=$(grep -Po "__version__\s*=\s*['\"]\K[^'\"]+" src/docbuild/__about__.py)
56+
5657
echo ":notice title=Branch version::$BRANCH_VERSION"
5758
echo ":notice title=Code version::$CODE_VERSION"
5859

0 commit comments

Comments
 (0)