Skip to content

Commit

Permalink
build: Fix generateChangelog failure ?
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed Dec 26, 2024
1 parent 5bfd697 commit d0a2825
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ open class GenerateImperiumChangelog : DefaultTask() {
@TaskAction
fun generate() {
val git = project.rootProject.extensions.getByType<IndraGitExtension>().git()!!
val latest = git.repository.resolve("v" + project.rootProject.file("VERSION.txt").readText().trim())
val head = git.repository.resolve(Constants.HEAD)
val latest = git.repository.resolve("v" + project.rootProject.file("VERSION.txt").readText().trim())!!
val head = git.repository.resolve(Constants.HEAD)!!
target.get().asFile.writer().buffered().use { writer ->
git.log().addRange(latest, head).call().forEach { commit ->
val message = commit.shortMessage ?: return@forEach
Expand Down
6 changes: 0 additions & 6 deletions imperium-discord/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,9 @@ application {
mainClass = "com.xpdustry.imperium.discord.ImperiumDiscordKt"
}

val generateChangelog by tasks.registering(GenerateImperiumChangelog::class) {
target = temporaryDir.resolve("imperium-changelog.txt")
}

tasks.shadowJar {
archiveFileName.set("imperium-discord.jar")

from(generateChangelog)

doFirst {
val file = temporaryDir.resolve("imperium-version.txt")
file.writeText(project.version.toString())
Expand Down

0 comments on commit d0a2825

Please sign in to comment.