Skip to content

hartungstenio/semver-j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hits-of-Code Actions Status

SemVer-J

A Java API for parsing and checking Semantic Versioning.

Features

  • Version parsing
  • Version comparison
  • Compatibility check

What's to come

  • Version adjustment (increment, build, tag, release);

Getting Started

The SemVer-J API is intended to be a standalone API for version comparison. No dependencies. You should depend on it ;)

Quickstart

Creating a new version

SemVer version = SemVer.of(1, 0, 0);

// Use the information
version.getMajor(); // 1
version.getMinor(); // 0
version.getPatch(); // 0

SemVer another = SemVer.parse("1.1.0");

// Version comparison
version.isNewerThan(another); // false
version.isOlderThan(another); // true
version.isCompatibleWith(another); // false
another.isCompatibleWith(version); // true

Problems?

If you find any issues please report them or better, send a pull request.

Authors:

  • Christian Hartung

About

Semantic Version parsing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages