Skip to content

fix: Read bash VERSION as env var in Python workflow script#9

Merged
mogglemoss merged 1 commit intomasterfrom
fix/workflow-python-var
Feb 28, 2026
Merged

fix: Read bash VERSION as env var in Python workflow script#9
mogglemoss merged 1 commit intomasterfrom
fix/workflow-python-var

Conversation

@mogglemoss
Copy link
Owner

Summary

Fixes the Set version info step in the GitHub Actions workflow.

Context

The previous attempt to replace sed with Python failed because it tried to evaluate a Python f-string ({VERSION}) referencing a Bash variable that Python didn't know about.

Approach

By explicitly passing VERSION as an environment variable (VERSION="$VERSION" python -c ...), the Python script can safely read it via os.environ.get('VERSION') and correctly inject the version string into __init__.py.

The previous Python one-liner attempted to use `{VERSION}` as an f-string, but `VERSION` was a bash variable. This correctly passes the bash variable as an environment variable into Python to ensure the regex successfully finds and updates it.
@mogglemoss mogglemoss merged commit f2be654 into master Feb 28, 2026
3 checks passed
@mogglemoss mogglemoss deleted the fix/workflow-python-var branch February 28, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant