Class Versioning

java.lang.Object
com.cleanroommc.versioning.Versioning

public final class Versioning extends Object
Computes a tag-native project version from Git state and branch policy.
  • Method Details

    • compute

      public static String compute(GitState git, String label, Map<String,String> metadata)
      Computes the version for the given state.
      Parameters:
      git - Git state at the build commit
      label - the pre-release label commits are counted under
      metadata - additional pre-release identifiers, rendered as .<key>.<value> in iteration order
      Returns:
      the full version
      Throws:
      IllegalArgumentException - if the label or any metadata entry is not a SemVer identifier, or if the branch leads to a version that has already been tagged