Skip to content

Commit d5b28bc

Browse files
authored
Allow name grep command in tag workflow to handle variable whitespace (#16)
* Allow name grep command in tag workflow to handle variable whitespace Closes #15 * Change quantifier from + to * Mistakenly used one or more whitespaces instead of zero or more
1 parent 70e7d14 commit d5b28bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
dry_run: true # Perform dryrun first to calculate new version
4747
- name: Get version file name set variables
4848
run: |
49-
pkg_name=$(grep -P 'version = \{attr = .*\}' pyproject.toml | grep -oP '\w+.__version__')
49+
pkg_name=$(grep -P 'version\h*=\h*\{\h*attr\h*=\h*\H*\h*\}' pyproject.toml | grep -oP '\w+.__version__')
5050
init_file="./src/${pkg_name//.__version__}/__init__.py"
5151
echo "VERSION_FILE=$init_file" >> "$GITHUB_ENV"
5252
echo "VERSION=${{ steps.tag_version.outputs.new_version }}" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)