Skip to content

Commit

Permalink
Fix tag script
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-f-cruz committed Nov 20, 2024
1 parent 849f47e commit d7c30cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tag_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
- name: Extract version from __init__.py and package name from pyproject.toml
id: get_version_and_name
run: |
package_name=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])")
package_name=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['name'])")
package_name=${package_name//-/_}
version=$(python -c "import re;
version=$(uv run python -c "import re;
with open(f'./src/${package_name}/__init__.py', 'r') as f:
content = f.read();
match = re.search(r'__version__\s*=\s*[\'\"]([^\'\"]+)[\'\"]', content);
Expand Down

0 comments on commit d7c30cb

Please sign in to comment.