Skip to content

A powershell module used to increment semantic version numbers

License

Notifications You must be signed in to change notification settings

ArwynFr/pwsh-SemanticVersion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArwynFr.SemanticVersion

A powershell module used to increment semantic version numbers.

PowerShell Gallery PowerShell Gallery GitHub License

You can download and install this powershell module from PSGallery:

Install-Module ArwynFr.SemanticVersion

ConvertTo-SemanticVersionBump

This function returns major, minor or patch depending on the presence of a +semver: major or +semver: minor tag in the commit message. It is intended to be used with Step-SemanticVersion.

ConvertTo-SemanticVersionBump
  [[-CommitMessage] <string>]
  [<CommonParameters>]
-CommitMessage

Required and Pipelinable. A commit message string that the command will use as an input.

Step-SemanticVersion

Returns an incremented semantic version number.

Step-SemanticVersion
  [[-Version] <semver>]
  [-BumpType] {major | minor | patch}
  [[-PreRelease] <string>]
  [[-Build] <string>]
  [<CommonParameters>]
-Version

Required and Pipelinable. Current version from which to do the increment.

-BumpType

Required. Must be one of major, minor, or patch. The new version number is incremented based on this value.

-PreRelease

Optional. If specified, sets the pre-release value of the new version.

-Build

Optional. If specified, sets the build value of the new version.

New-GithubSemanticVersionRelease

This function creates a new GitHub release by getting the latest release version and incrementing based on the presence of a +semver: major or +semver: minor tag in the current commit message. It returns the new version number as a semver structure so you can use it in the rest of your script.

New-GithubSemanticVersionRelease
  [-AddTags]
  [<CommonParameters>]
-AddTags

Optional switch. If set, the command will also create and force push tags for major and minor versions.