Skip to content

Allow Update-PSModuleManifest to remove pre-release tag #1394

Open
@fourpastmidnight

Description

@fourpastmidnight

Summary of the new feature / enhancement

I am a module author. Until recently, I have been using the BuildHeplers module from GitHub user RamblingCookieMonster. One thing that module has is the ability to update the module manifest, though, it has limitations.

So I was perusing the code of this project and came across the UpdateModuleManifest.cs class. And lo and behold, it's a cmdlet! Awesome, I can remove my projects' dependency on BuildHelpers, which is all but abandonware at this point.

But then I came across these lines of code in UpdateModuleManifest.cs:

[ValidateNotNullOrEmpty]
public string Prerelease { get; set; }

So now I'm left wondering, as a module author, how would I go about, in an automated fashion—during a build, for example—removing a pre-release tag when my module goes GA?

Proposed technical implementation details (optional)

Since this cmdlet is meant to update a module's manifest, I would expect that I could execute the following to effectively move to a GA status, using this project as an example:

Update-PSModuleManifest -Path './src/MIcrosoft.PowerShell.PSResourceGet.psd1' -Version 0.5.25 -PreRelease ''

This bumps the version of the module to the next patch version and removes the pre-release tag in the metadata section of the module manifest.

So the proposed change is the removal of the [ValidateNotNullOrEmpty] attribute from this parameter property of the cmdlet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions