Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
🎉 0.6.5 released
Browse files Browse the repository at this point in the history
  • Loading branch information
StarWishsama committed Feb 20, 2022
1 parent 4aed3af commit 79170f4
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {
}

group = "io.github.starwishsama.comet"
version = "0.6.5" + getGitInfo()
version = "0.6.5"

tasks.jar {
manifest {
Expand Down Expand Up @@ -112,20 +112,6 @@ buildConfig {
buildConfigField("String", "miraiVersion", "\"${Versions.miraiVersion}\"")
}

fun getGitInfo(): String {
val commitHashCommand = "git rev-parse --short HEAD"
val commitHash = Runtime.getRuntime().exec(commitHashCommand).inputStream.bufferedReader().readLine()

val branchCommand = "git rev-parse --abbrev-ref HEAD"
var branch = Runtime.getRuntime().exec(branchCommand).inputStream.bufferedReader().readLine()

if (branch.isEmpty()) {
branch = "UnknownBranch"
}

return "-$branch-$commitHash"
}

tasks.test {
useJUnitPlatform()
}
Expand Down

0 comments on commit 79170f4

Please sign in to comment.