When Task.ps1 is determining whether the $FromModule is suitable, it does a check of the $taskModule version against $version which was passed into the file as a parameter.
This version is strict enough that patch release differences in the version number cause the $taskModule to be rejected and the task errors out.
Expected Behavior
My expectation would be that a patch (z) should probably not cause a module to be rejected. This is a personal assumption, but given that I don't actually know yet where the $version parameter is coming from, I can't say with certainty that this should be the expectation for all users.
Current Behavior
The task I am executing, build, is expecting version 0.1.0 of the PowerShellBuild module. Currently I have version 0.1.1 installed. That z release difference in version number is causing the build task to fail.
Possible Solution
Change to a version check that ensures only that Major and Minor version match. I think you could make an argument that it should be Major is equal and Minor is Greater Than or Equal, but since I don't know where the $version parameter is actually coming from, it's hard for me to say.
Steps to Reproduce (for bugs)
- Install psake 4.8
- Install PowerShellBuild 0.1.1
- Create a module using the Stucco Module
- Execute build.ps1 -task build
Context
Currently I am unable to build a module with the latest version of the PowerShellBuild module unless I modify my copy of the Psake to allow the z release copy of PowerShellBuild.
Your Environment
Psake 4.8.0
PowerShellBuild 0.1.1
0.1.0
Windows 10
PowerShell 6.1.0
When Task.ps1 is determining whether the $FromModule is suitable, it does a check of the $taskModule version against $version which was passed into the file as a parameter.
This version is strict enough that patch release differences in the version number cause the $taskModule to be rejected and the task errors out.
Expected Behavior
My expectation would be that a patch (z) should probably not cause a module to be rejected. This is a personal assumption, but given that I don't actually know yet where the $version parameter is coming from, I can't say with certainty that this should be the expectation for all users.
Current Behavior
The task I am executing, build, is expecting version 0.1.0 of the PowerShellBuild module. Currently I have version 0.1.1 installed. That z release difference in version number is causing the build task to fail.
Possible Solution
Change to a version check that ensures only that Major and Minor version match. I think you could make an argument that it should be Major is equal and Minor is Greater Than or Equal, but since I don't know where the $version parameter is actually coming from, it's hard for me to say.
Steps to Reproduce (for bugs)
Context
Currently I am unable to build a module with the latest version of the PowerShellBuild module unless I modify my copy of the Psake to allow the z release copy of PowerShellBuild.
Your Environment
Psake 4.8.0
PowerShellBuild 0.1.1
0.1.0
Windows 10
PowerShell 6.1.0