Skip to content

Commit

Permalink
0.2.0+alpha.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ishland committed Jun 20, 2021
1 parent 99c4b51 commit 63ab222
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pipeline {
publisherStrategy: 'EXPLICIT'
) {
scmSkip(deleteBuild: true, skipPattern:'.*\\[CI-SKIP\\].*')
sh 'git fetch --tags'
sh 'chmod +x ./gradlew'
sh './gradlew clean build'
}
Expand Down
18 changes: 17 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16

archivesBaseName = "${project.archives_base_name}-mc${project.minecraft_version}"
version = project.mod_version
version = project.mod_version + "." + commitsSinceLastTag()
group = project.maven_group

getLogger().info("Version String: ${version}")

loom {
accessWidener "src/main/resources/c2me.accesswidener"
}
Expand Down Expand Up @@ -87,3 +89,17 @@ publishing {
// mavenLocal()
}
}

String commitsSinceLastTag() {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags'
standardOutput = stdout
}
stdout = stdout.toString()
if (stdout.indexOf('-') < 0) {
return 0;
}
def split = stdout.split('-')
return split[split.length - 2]
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ minecraft_version=1.17.1-pre1
yarn_mappings=1.17.1-pre1+build.1
loader_version=0.11.3
# Mod Properties
mod_version=0.1-SNAPSHOT
mod_version=0.2.0+alpha.1
maven_group=com.ishland.c2me
archives_base_name=c2me-fabric
# Java Dependencies
Expand Down

0 comments on commit 63ab222

Please sign in to comment.