Skip to content

additional Build task dependencies listed in $PSBPreference.Build.Dependencies do not run. #37

Open
@joeypiccola

Description

@joeypiccola

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)

  1. simply set $PSBPreference.Build.Dependencies in the properties block of a psakeFile.ps1 with the value of @('MyExtraBuildTask')
  2. create a task in the psakeFile.ps1 e.g...
task MyExtraBuildTask {
    "doing extra things"
}
  1. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions