I have the task BumpVersion that I want the Build task to depend on. That said, I found $PSBPreference.Build.Dependencies and have supplied the following array @('StageFiles', 'BuildHelp', 'BumpVersion'). However, BumpVersion never runs. StageFiles and BuildHelp do run.
Expected Behavior
When running the Build task, additional dependencies listed in $PSBPreference.Build.Dependencies should also run.
Current Behavior
When running the Build task, additional dependencies listed in $PSBPreference.Build.Dependencies do not run. Strangely enough, when supplying $PSBPreference.Build.Dependencies with only BumpVersion the default build task dependencies StageFiles and BuildHelp still run making me think $PSBPreference.Build.Dependencies is not even being correctly passed.
Possible Solution
I've verified $PSBPreference.Build.Dependencies is being supplied to the Build task here:
|
task Build -depends $PSBPreference.Build.Dependencies -description 'Builds module and generate help documentation' |
Steps to Reproduce (for bugs)
- simply set
$PSBPreference.Build.Dependencies in the properties block of a psakeFile.ps1 with the value of @('MyExtraBuildTask')
- create a task in the
psakeFile.ps1 e.g...
task MyExtraBuildTask {
"doing extra things"
}
- run build.ps1
Context
I have a few extra tasks that I want to run as part of the build. Specifically, a task that bumps the module version if it has not already been incremented and also a task that uploads test results to appveyor when the BuildSystem is appveyor.
Your Environment
- Module version used:
PowerShellBuild = 0.3.0
Psake = 4.8.0
- Operating System and PowerShell version:
MacOS 10.14.6
PowerShell = 6.2.0
I have the task
BumpVersionthat I want theBuildtask to depend on. That said, I found$PSBPreference.Build.Dependenciesand have supplied the following array@('StageFiles', 'BuildHelp', 'BumpVersion'). However,BumpVersionnever runs.StageFilesandBuildHelpdo run.Expected Behavior
When running the
Buildtask, additional dependencies listed in$PSBPreference.Build.Dependenciesshould also run.Current Behavior
When running the
Buildtask, additional dependencies listed in$PSBPreference.Build.Dependenciesdo not run. Strangely enough, when supplying$PSBPreference.Build.Dependencieswith onlyBumpVersionthe default build task dependenciesStageFilesandBuildHelpstill run making me think$PSBPreference.Build.Dependenciesis not even being correctly passed.Possible Solution
I've verified
$PSBPreference.Build.Dependenciesis being supplied to theBuildtask here:PowerShellBuild/PowerShellBuild/psakeFile.ps1
Line 54 in 11e1b94
Steps to Reproduce (for bugs)
$PSBPreference.Build.Dependenciesin thepropertiesblock of apsakeFile.ps1with the value of @('MyExtraBuildTask')psakeFile.ps1e.g...Context
I have a few extra tasks that I want to run as part of the build. Specifically, a task that bumps the module version if it has not already been incremented and also a task that uploads test results to appveyor when the BuildSystem is appveyor.
Your Environment
PowerShellBuild = 0.3.0
Psake = 4.8.0
MacOS 10.14.6
PowerShell = 6.2.0