Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable user configuration of build_command env vars #925

Merged

Conversation

codejedi365
Copy link
Contributor

Purpose

Rationale

Primarily to be good stewards of the provided authentication tokens to PSR, we do not blindly pass the entire parent process environment on to the child process of the build. However, as #922 mentioned, there is a legitimate need to pass some user-defined environment variables on to the build_command child process. This happy median is to provide a build_command_env configuration option that will handle definitions of either hardcoded values or variables desired to be passed along to the subprocess.

How I tested

Added a separate cli test with a pyproject.toml configuration that included all the ways users can provide an environment variable. We allow direct pass through, and hardcoded variables (empty or not). I also ran the psr-test-gha repo with a build script that would of failed if it didn't receive the proper environment variables and it succeeded.

@codejedi365 codejedi365 self-assigned this May 13, 2024
@codejedi365 codejedi365 merged commit 6b5b271 into python-semantic-release:master May 13, 2024
7 checks passed
@codejedi365 codejedi365 deleted the fix/build-cmd-env branch May 13, 2024 01:08
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.

build_command environment variables not working after upgrade from 9.6.0 to 9.7.0
1 participant