Skip to content

eldoriarpg/SemVerTools

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Feb 19, 2023
May 31, 2022
Mar 4, 2023
May 31, 2022
May 31, 2022
Oct 3, 2021
Sep 9, 2021
Sep 9, 2021
Oct 3, 2021
Feb 25, 2023
Feb 13, 2023
Nov 25, 2022
Oct 2, 2021
Nov 8, 2021

Repository files navigation

GitHub Workflow Status GitHub Workflow Status

Sonatype Nexus (Releases) Sonatype Nexus (Development) Sonatype Nexus (Snapshots)

Total alerts Language grade: Java

SemVerTools

This is a Java library providing tooling for semantic versioning.

Currently, it can mainly parse and compare valid semver strings.

Example Usage

To check if an update is available for a program, library, framework, etc., it is a common approach to compare the versions, given as strings.

With SemVerTools, this is as easy as doing

String thisVersion = ...;
String remoteVersion = ...;
SemanticVersion current = SemanticVersion.parse(thisVersion);
SemanticVersion next = SemanticVersion.parse(remoteVersion);
if (next.succeeds(current)) {
    System.out.println("New version available: " + next);
}

Using this library

Gradle

repositories {
    maven {
        url = uri("https://eldonexus.de/repository/maven-public")
    }
}

dependencies {
    implementation("de.eldoria", "semvertools", "{version}")
}

Maven

    <repositories>
        <repository>
            <id>EldoNexus</id>
            <url>https://eldonexus.de/repository/maven-public</url>
        </repository>
    </repositories>
    
    <dependencies>
        <dependency>
            <groupId>de.eldoria</groupId>
            <artifactId>semvertools</artifactId>
            <version>{version}</version>
        </dependency>
    </dependencies>

Contributing to this project

If you want to contribute, please check out the Contribution Notes

Issues, Ideas, Questions

If you found a bug, please report it to the issue tracker. Make sure you don't report a bug that was already reported before.

If you have a feature request, feel free to explain your idea in an issue too.

If you have any questions, feel free to start a discussion.

License

SemVerTools is licenced under the MIT license.