Skip to content

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