From 169befa805d663ad25ecc6a9ab322fb963013fd4 Mon Sep 17 00:00:00 2001 From: jamiecobbett Date: Wed, 27 May 2026 16:31:01 +0100 Subject: [PATCH] Fix check_version step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The r\"...\" raw string breaks because in Python raw strings \" doesn't escape the quote — it literally terminates the string. I tried the code and was able to reproduce the error. This version works locally and gets the right result. This failed with: Run VERSION=$(python -c "import re; print(re.search(r\"version\s*=\s*['\"']([^'\"']+)['\"']\", open('setup.py').read()).group(1))") File "", line 1 import re; print(re.search(r"version\s*=\s*['"']([^'"']+)['"']", open('setup.py').read()).group(1)) ^ SyntaxError: unterminated string literal (detected at line 1) Error: Process completed with exit code 1. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5486e884..4aabd0cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,7 +53,7 @@ jobs: - name: Check if version tag exists id: check run: | - VERSION=$(python -c "import re; print(re.search(r\"version\s*=\s*['\"']([^'\"']+)['\"']\", open('setup.py').read()).group(1))") + VERSION=$(python -c "import re; print(re.search(r\"version\s*=\s*'([^']+)'\", open('setup.py').read()).group(1))") echo "version=$VERSION" >> $GITHUB_OUTPUT if git rev-parse "v${VERSION}" >/dev/null 2>&1; then echo "Tag v${VERSION} already exists, skipping publish"