Update version metadata, fabric, and yarn; bump version

This commit is contained in:
tibs 2022-01-25 17:43:50 -05:00
parent 6418399d20
commit 253196c683
Signed by untrusted user who does not match committer: tibs
GPG key ID: 047833989F50F88F
2 changed files with 15 additions and 14 deletions

View file

@ -8,7 +8,7 @@ sourceCompatibility = '17'
targetCompatibility = '17' targetCompatibility = '17'
archivesBaseName = project.archives_base_name archivesBaseName = project.archives_base_name
version = "${project.mod_version}${getVersionMetadata()}" version = "${project.mod_version}+${getMetadata()}"
group = project.maven_group group = project.maven_group
repositories { repositories {
@ -68,16 +68,10 @@ jar {
} }
} }
def getVersionMetadata() { def getMetadata() {
def build_id = System.getenv("GITHUB_RUN_NUMBER") def build_id = System.getenv("GITHUB_RUN_NUMBER")
def workflow_id = System.getenv("GITHUB_WORKFLOW")
// CI builds only def metadata = project.minecraft_version
if (workflow_id == "build-release") {
return "+${project.minecraft_version}"
} else if (build_id != null) {
return "+build.${build_id}"
}
if (grgit != null) { if (grgit != null) {
def head = grgit.head() def head = grgit.head()
@ -88,6 +82,13 @@ def getVersionMetadata() {
id += "-dirty" id += "-dirty"
} }
return "+rev.${id}" metadata += "-${id}"
} }
// CI builds only
if (build_id != null) {
metadata += ".${build_id}"
}
return metadata
} }

View file

@ -4,14 +4,14 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://modmuss50.me/fabric.html # check these on https://modmuss50.me/fabric.html
minecraft_version=1.18.1 minecraft_version=1.18.1
yarn_mappings=1.18.1+build.18 yarn_mappings=1.18.1+build.22
loader_version=0.12.12 loader_version=0.12.12
fabric_version=0.46.0+1.18 fabric_version=0.46.2+1.18
# Mod Properties # Mod Properties
mod_version=1.0.0 mod_version=1.0.1
maven_group=me.tibinonest.mods maven_group=me.tibinonest.mods
archives_base_name=cauldron-dying archives_base_name=cauldron-dyeing
# Dependencies # Dependencies
sodium_version=mc1.18.1-0.4.0-alpha6 sodium_version=mc1.18.1-0.4.0-alpha6