Skip to content

Commit 899bf35

Browse files
committed
fix: use heredoc for inline python in CD version check
1 parent b16086e commit 899bf35

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/cd.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,13 @@ jobs:
6565
env:
6666
VERSION: ${{ github.event.inputs.version }}
6767
run: |
68-
CURRENT=$(python -c "
68+
CURRENT=$(python - <<'PY'
6969
import re
7070
content = open('src/treemapper/version.py').read()
71-
m = re.search(r'__version__\s*=\s*[\"'\'']([^\"'\'']+)[\"'\'']', content)
71+
m = re.search(r'__version__\s*=\s*["\']([^"\']+)["\']', content)
7272
print(m.group(1) if m else '')
73-
")
73+
PY
74+
)
7475
if [ "$CURRENT" = "$VERSION" ]; then
7576
echo "Error: version.py already contains version $VERSION"
7677
echo "Nothing to release - version is already set."

0 commit comments

Comments
 (0)