mirror of
https://github.com/TibiNonEst/cauldron-dyeing.git
synced 2025-08-08 19:53:57 -05:00
Update version metadata, fabric, and yarn; bump version
This commit is contained in:
parent
6418399d20
commit
253196c683
2 changed files with 15 additions and 14 deletions
21
build.gradle
21
build.gradle
|
@ -8,7 +8,7 @@ sourceCompatibility = '17'
|
|||
targetCompatibility = '17'
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = "${project.mod_version}${getVersionMetadata()}"
|
||||
version = "${project.mod_version}+${getMetadata()}"
|
||||
group = project.maven_group
|
||||
|
||||
repositories {
|
||||
|
@ -68,16 +68,10 @@ jar {
|
|||
}
|
||||
}
|
||||
|
||||
def getVersionMetadata() {
|
||||
def getMetadata() {
|
||||
def build_id = System.getenv("GITHUB_RUN_NUMBER")
|
||||
def workflow_id = System.getenv("GITHUB_WORKFLOW")
|
||||
|
||||
// CI builds only
|
||||
if (workflow_id == "build-release") {
|
||||
return "+${project.minecraft_version}"
|
||||
} else if (build_id != null) {
|
||||
return "+build.${build_id}"
|
||||
}
|
||||
def metadata = project.minecraft_version
|
||||
|
||||
if (grgit != null) {
|
||||
def head = grgit.head()
|
||||
|
@ -88,6 +82,13 @@ def getVersionMetadata() {
|
|||
id += "-dirty"
|
||||
}
|
||||
|
||||
return "+rev.${id}"
|
||||
metadata += "-${id}"
|
||||
}
|
||||
|
||||
// CI builds only
|
||||
if (build_id != null) {
|
||||
metadata += ".${build_id}"
|
||||
}
|
||||
|
||||
return metadata
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue