Skip to content

Commit

Permalink
fix version output
Browse files Browse the repository at this point in the history
  • Loading branch information
Stereo528 committed Aug 5, 2023
1 parent 01f94a9 commit c85cf33
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

archivesBaseName = "${project.archives_base_name}-mc${libs.versions.minecraft.get()}"
version = "${project.mod_version}+${getVersion()}"
version = getVersion()
group = project.maven_group

repositories {
Expand Down Expand Up @@ -80,7 +80,7 @@ publishing {
mavenJava(MavenPublication) {
groupId project.maven_group
artifactId "${project.archives_base_name}"
version getVersion()
version "${project.mod_version}+${getVersion()}"
from components.java
}
}
Expand All @@ -102,11 +102,12 @@ loom {
}

String getVersion() {
def mod_version = project.mod_version
def build_id = System.getenv("GITHUB_RUN_NUMBER")

// CI builds only
if (build_id != null) {
return "build.${build_id}"
return "${mod_version}+build.${build_id}"
}

if (grgit != null) {
Expand All @@ -118,10 +119,10 @@ String getVersion() {
id += "-dirty"
}

return "rev.${id}"
return "${mod_version}+rev.${id}"
}

// No tracking information could be found about the build
return "unknown"
return "${mod_version}+unknown"

}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs = -Xmx2G
org.gradle.parallel = true

# Mod Properties
mod_version = 1.4.0
mod_version = 1.4.1
maven_group = com.stereo528
archives_base_name = moue_milkshakes

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/moue_milkshakes/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"itemGroup.moue_milkshakes.milkshakes_tab": "Moue Milkshakes",
"item.moue_milkshakes.strawberry_shake": "Strawberry Shake",
"item.moue_milkshakes.strawberry_juice": "Strawberry Juice",
"item.moue_milkshakes.chocolate_shake": "Chocolate Shake",
"item.moue_milkshakes.vanilla_shake": "Vanilla Shake",
"item.moue_milkshakes.moue_shake": "Moue Shake",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "moue_milkshakes:item/strawberry_juice"
}
}

0 comments on commit c85cf33

Please sign in to comment.