Skip to content

Commit

Permalink
Merge pull request #539 from ah-OOG-ah/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Roadhog360 authored Oct 31, 2024
2 parents 5cdf0c3 + 564a5f1 commit 101d716
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,25 @@
plugins {
id 'com.gtnewhorizons.gtnhconvention'
}

// The planned name of the next release
def NEXT_VERSION = "2.6.1"
version = NEXT_VERSION

// Append to the version as needed. If the variables look a bit strange, that's because they are -
// git-version doesn't expose a ton of useful functions, we need to extract them indirectly.

// If we have a clean tag (or manually specified), this is a production release.
// No need for the commit hash!
def details = versionDetails()
def isPlainTag = details.getCommitDistance() == 0
def noCommitHash = providers.gradleProperty("noCommitHash").isPresent()
if (!isPlainTag && !noCommitHash) {
version += "-" + details.gitHash
}

// If we have uncommitted changes, say so.
def isDirty = gitVersion().endsWith(".dirty")
if (isDirty && !noCommitHash) {
version += "-dirty"
}

0 comments on commit 101d716

Please sign in to comment.