dotnet-semver
1.0.0-beta.3
This is a prerelease version of dotnet-semver.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global dotnet-semver --version 1.0.0-beta.3
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local dotnet-semver --version 1.0.0-beta.3
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-semver&version=1.0.0-beta.3&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package dotnet-semver --version 1.0.0-beta.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
dotnet-semver
dotnet-semver
is a dotnet re-implementation of the ruby semver2 gem cli.
Quickstart
Install
dotnet tool install -g dotnet-semver
Use
# Find the .semver file and print a formatted string from this.
semver # => v2.3.4
# Initialize the .semver file.
semver init
# Print the tag for the current .semver file.
semver tag # => v0.1.0
semver inc minor # => v0.2.0
semver pre "alpha.45" # => v0.2.0-alpha.45
semver meta "md5.abc123" # => v0.2.0-alpha.45+md5.abc123
semver format "%M.%m.x" # => 0.2.x
semver meta # => v0.2.0-alpha.45
git tag -a `semver tag`
say 'that was easy'
cat .semver
---
:major: 0
:minor: 2
:patch: 0
:special: 'alpha.45'
:metadata: ''
Wrap dotnet CLI Commands
dotnet-semver
can wrap the dotnet cli commands build
, pack
and publish
, automatically adding the necessary version switch to the command line.
For example the command:
dotnet semver build --configuration Release
is executed as:
dotnet build /p:Version=0.2.0-alpha.45 --configuration Release
Git Integration
git config --global alias.semtag '!git tag -a $(semver tag) -m "tagging $(semver tag)"'
Usage
USAGE: dotnet semver [--help] [init [--force] | inc <version> | pre <value> | meta <value> | tag | next <version> | format <format>]
OPTIONS:
--help - Display this list of options.
SUBCOMMANDS:
init[ialize] [--force] - Initializes a new .semver file with an initial version v0.1.0.
inc[rement] <version> - Increments the specified version number according to semver2 rules. <version> must be one of [major|minor|patch].
pre[release] <value> - Sets the pre-release version suffix.
meta[data] <value> - Sets the metadata value.
next <version> - Format incremented specific version without saving it. <version> must be one of [major|minor|patch].
tag - Print the tag for the current .semver file.
format <format> - Find the .semver file and print a formatted string from this.
DOTNET CLI WRAPPERS:
build [args] - Executes dotnet build, passing the current semver as a switch.
pack [args] - Executes dotnet pack, passing the current semver as a switch.
publish [args] - Executes dotnet publish, passing the current semver as a switch.
Credits
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
1.2.0 | 117 | 12/2/2024 |
1.1.0 | 144 | 8/3/2024 |
1.0.0 | 131 | 6/2/2024 |
1.0.0-beta.4 | 82 | 5/16/2024 |
1.0.0-beta.3 | 110 | 5/15/2024 |