PowerShell / PowerShell/PSResourceGet

Allow Update-PSModuleManifest to remove pre-release tag

Open
#1,394 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-InfoFile feature_request
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

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:

https://github.com/PowerShell/PSResourceGet/blob/e71e500d3aa964d39fb29598a1f3427ccabb75c1/src/code/UpdateModuleManifest.cs#L233-L234

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/code/UpdateModuleManifest.cs at the PreRelease parameter and the referenced ValidateNotNullOrEmpty attribute. Update-PSModuleManifest should accept an empty -PreRelease value and remove the pre-release tag from the manifest when invoked with the example command.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, tooling
Issue type
Feature
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.