mirror of
https://github.com/TibiNonEst/cauldron-dyeing.git
synced 2024-11-24 03:27:19 -05:00
Redo versioning
This commit is contained in:
parent
cc0fe6f455
commit
202ba71857
1 changed files with 9 additions and 6 deletions
15
build.gradle
15
build.gradle
|
@ -72,10 +72,18 @@ jar {
|
|||
|
||||
def getMetadata() {
|
||||
def build_id = System.getenv("GITHUB_RUN_NUMBER")
|
||||
def workflow_id = System.getenv("GITHUB_WORKFLOW")
|
||||
|
||||
def metadata = project.minecraft_version
|
||||
|
||||
if (grgit != null) {
|
||||
// Release builds only
|
||||
if (workflow_id == "build-release") {
|
||||
return metadata
|
||||
}
|
||||
|
||||
if (build_id != null) {
|
||||
metadata += "-build.${build_id}"
|
||||
} else if (grgit != null) {
|
||||
def head = grgit.head()
|
||||
def id = head.abbreviatedId
|
||||
|
||||
|
@ -87,10 +95,5 @@ def getMetadata() {
|
|||
metadata += "-${id}"
|
||||
}
|
||||
|
||||
// CI builds only
|
||||
if (build_id != null) {
|
||||
metadata += ".${build_id}"
|
||||
}
|
||||
|
||||
return metadata
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue