https://github.com/chadnpc/clihelper.semver

PowerShell module for robust and type-safe Semantic Versioning.

https://github.com/chadnpc/clihelper.semver

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.6%) to scientific vocabulary

Keywords

powershell semver
Last synced: 5 months ago · JSON representation

Repository

PowerShell module for robust and type-safe Semantic Versioning.

Basic Info
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
powershell semver
Created 12 months ago · Last pushed 12 months ago
Metadata Files
Readme License

README.md

cliHelper.semver

PowerShell module for robust and type-safe Semantic Versioning.

Build Module Downloads

Usage

First:

PowerShell Install-Module cliHelper.semver Import-Module cliHelper.semver

Once imported,

  • Create version Objects

PowerShell # You can create [Semanticver] objects in a few ways: #+ 1. Using `New-SemanticVersion` with a version string: $version = New-SemanticVersion -VersionString "1.2.3-alpha+build123" $version #Output: #goes here # # + 2. Using `New-SemanticVersion` with individual components:** $version = New-SemanticVersion -Major 2 -Minor 0 -Patch 0 -PreRelease "rc.2" $version #Output: #goes here #+3. Using `ConvertTo-SemanticVersion` from a string:** $versionString = "3.1.4+meta.info" $version = ConvertTo-SemanticVersion -InputObject $versionString $version

  • Validate Semantic Versions

```PowerShell Test-SemanticVersion -VersionString "1.5.0" # Output: True

Test-SemanticVersion -VersionString "invalid-version-format" # Output: False ```

  • Increment Version Components

PowerShell $version = New-SemanticVersion -VersionString "1.2.3-beta" $incrementedVersion = Step-SemanticVersion -Version $version -Component Minor $incrementedVersion

You can increment Major, Minor, Patch, PreReleaseIdentifier, or BuildMetadata components.

  • Retrieve individual components

```PowerShell $version = New-SemanticVersion -VersionString "2.5.7-rc.1+build.99" Get-SemanticVersionComponent -Version $version -Component PreReleaseIdentifier # Output: rc.1

Get-SemanticVersionComponent -Version $version -Component Major # Output: 2 ```

  • Compare versions

PowerShell $version1 = New-SemanticVersion -VersionString "1.0.0-alpha" $version2 = New-SemanticVersion -VersionString "1.0.0-beta" $comparisonResult = Compare-SemanticVersion -ReferenceVersion $version1 -DifferenceVersion $version2 $comparisonResult This will output Lower, Equal, or Higher based on SemVer precedence rules.

License

This project is licensed under the WTFPL License.

Owner

  • Name: alain
  • Login: chadnpc
  • Kind: user

GitHub Events

Total
  • Push event: 5
  • Create event: 2
Last Year
  • Push event: 5
  • Create event: 2

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/build_module.yaml actions
.github/workflows/codereview.yaml actions
  • anc95/ChatGPT-CodeReview v1.0.12 composite
.github/workflows/delete_old_workflow_runs.yaml actions
  • Mattraks/delete-workflow-runs v2 composite
.github/workflows/publish.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite