https://github.com/chadnpc/clihelper.semver
PowerShell module for robust and type-safe Semantic Versioning.
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
Repository
PowerShell module for robust and type-safe Semantic Versioning.
Basic Info
- Host: GitHub
- Owner: chadnpc
- License: wtfpl
- Language: PowerShell
- Default Branch: main
- Homepage: https://www.powershellgallery.com/packages/cliHelper.semver
- Size: 26.4 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
cliHelper.semver
PowerShell module for robust and type-safe Semantic Versioning.
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
- Website: https://linktr.ee/chadnpc
- Repositories: 82
- Profile: https://github.com/chadnpc
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
- anc95/ChatGPT-CodeReview v1.0.12 composite
- Mattraks/delete-workflow-runs v2 composite
- actions/checkout v3 composite
- actions/upload-artifact v3 composite