From ce3d63b4db1723cce7fb89bc0729174a152705eb Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Fri, 17 Apr 2026 05:16:52 -0500 Subject: [PATCH] Fix Python heredoc: use os.environ instead of shell var expansion Quoted heredoc (<< 'PYEOF') prevents shell expansion of ${VAR}. Pass values via exported env vars and read with os.environ in Python. Co-Authored-By: Claude Opus 4.6 (1M context) --- templates/workflows/joomla/auto-release.yml.template | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/workflows/joomla/auto-release.yml.template b/templates/workflows/joomla/auto-release.yml.template index d26e3ac..8b68610 100644 --- a/templates/workflows/joomla/auto-release.yml.template +++ b/templates/workflows/joomla/auto-release.yml.template @@ -553,15 +553,16 @@ jobs: TAR_URL="${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/download/${RELEASE_TAG}/${TAR_NAME}" # Use Python to update only the stable entry's downloads + sha256 + export PY_ZIP_URL="$ZIP_URL" PY_TAR_URL="$TAR_URL" PY_SHA="$SHA256_ZIP" python3 << 'PYEOF' - import re + import re, os with open("updates.xml") as f: content = f.read() - zip_url = "${ZIP_URL}" - tar_url = "${TAR_URL}" - sha = "${SHA256_ZIP}" + zip_url = os.environ["PY_ZIP_URL"] + tar_url = os.environ["PY_TAR_URL"] + sha = os.environ["PY_SHA"] # Find the stable update block and replace its downloads + sha256 def replace_stable(m):