BuildHelpers
BuildHelpers copied to clipboard
Allow setting of custom build variables
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