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

Allow setting of custom build variables #142

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fourpastmidnight
Copy link
Contributor

This pull request allows one to specify custom build variables that should be created when setting up the build environment when invoking Set-BuildEnvironment. Just like for the -BuildOutput parameter, it allows for the values of custom variables to contain the names of other custom variables and BuildHelpers-defined variables defined by the current call, which will be expanded.

For example, assuming my project is located in C:\Projects\MyProject:

Set-BuildEnvironment `
    -VariableNamePrefix 'MYPROJECT_' `
    -BuildOutput '$ProjectPath\build' `
    -CustomVariables @{
        'ARTIFACTSDIR' = '$ProjectPath\out'
        'HELPARTIFACTSDIR' = '$ARTIFACTSDIR\docs'
    } `

This would result in the following output for the custom variables:

Name                        Value
----                        -----
MYPROJECT_ARTIFACTSDIR      C:\Projects\MyProject\out
MYPROJECT_HELPARTIFACTSDIR  C:\Projects\MyProject\out\docs

Closes #141

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.

Feature Request: Allow for specifying custom build environment variables
1 participant