Move to 4-character git hash for dev builds

Needed in order to fit the whole version into 32 characters
This commit is contained in:
embeddedt 2023-08-03 12:20:19 -04:00
parent 81ebcc8186
commit fac9f6fac9
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -41,7 +41,7 @@ allprojects {
}
def baseVersion = details.lastTag.substring(0, plusIndex)
def dirtyMarker = grgit.status().clean ? "" : ".dirty"
def commitHashMarker = details.commitDistance > 0 ? ("." + details.gitHash) : ""
def commitHashMarker = details.commitDistance > 0 ? ("." + details.gitHash.substring(0, Math.min(4, details.gitHash.length()))) : ""
def preMarker = (details.commitDistance > 0 || !details.isCleanTag) ? ("-beta." + details.commitDistance) : ""
if(preMarker.length() > 0) {
// bump to next patch release