Skip to content

Existing Module Version Check Very Strict #7

Closed

Description

@RandomNoun7

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)

  1. Install psake 4.8
  2. Install PowerShellBuild 0.1.1
  3. Create a module using the Stucco Module
  4. 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

Activity

  1. RandomNoun7 commented on Nov 14, 2018

    @RandomNoun7
    Author

    Closing as this was accidentally created against PowerShellBuild and should have been targeted at PSake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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