Semver
Yet another Crystal library for Semantic Versioning. Its implementation is slightly different than the Crystal standard library.
Installation
Add this to your application's shard.yml
:
dependencies:
semver:
github: mosop/semver
Usage
require "semver"
Components
ver = Semver.parse("1.0.0-rc.1+build-794")
ver.major # 1
ver.minor # 0
ver.patch # 0
ver.prerelease # "rc.1"
ver.build # "build-794"
Comparison
Semver implements:
- Comparable(Semver)
- Comparable(String)
Semver.parse("1.0.0-alpha") < "1.0.0-beta" # true
Contributing
- Fork it ( https://github.com/mosop/semver/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- mosop - creator, maintainer