Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scriptkitties/perl6-semver
Class representing a semantic version number
https://github.com/scriptkitties/perl6-semver
Last synced: 6 days ago
JSON representation
Class representing a semantic version number
- Host: GitHub
- URL: https://github.com/scriptkitties/perl6-semver
- Owner: scriptkitties
- Created: 2017-10-18T10:57:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-23T09:23:55.000Z (about 7 years ago)
- Last Synced: 2024-11-13T11:52:57.991Z (2 months ago)
- Language: Perl 6
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= SemVer
:toc: preamblehttp://semver.org/[Semantic versioning] is a standard to give version numbers
meaning. To work with these versions, the `SemVer` class comes into play. It
will deal with incrementing the version for you, and making it easy to work
with it programmatically.== Installation
Use `zef`, the Perl 6 module installer:[source]
----
# zef install SemVer
----== Usage
[source,perl6]
----
use SemVer;# Create a new SemVer from a string
my SemVer $v .= new("1.12.3");
# new(1, 12, 3); # Alternative methodsay $v.Str; # "1.12.3";
# Increment the patch level
$v.bump-patch;say $v.Str; # "1.12.4"
# Increment minor level
$v.bump-minor;say $v.Str; # "1.13.0"
# Increment major level
$v.bump-major;say $v.Str; # "2.0.0"
----== License
This module is released under the terms of the GNU GPL version 3 or later.