1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-07 16:00:31 +00:00

Fix a couple of issues with the release process

Only way to test these is in prod, alas :D:
This commit is contained in:
Jonathan Coates 2022-11-01 21:52:49 +00:00
parent 6b93fafc46
commit aefda6a381
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
2 changed files with 5 additions and 3 deletions

View File

@ -364,7 +364,7 @@ val publishCurseForge by tasks.registering(TaskPublishCurseForge::class) {
apiToken = findProperty("curseForgeApiKey") ?: "" apiToken = findProperty("curseForgeApiKey") ?: ""
enabled = apiToken != "" enabled = apiToken != ""
val mainFile = upload("282001", tasks.shadowJar) val mainFile = upload("282001", tasks.shadowJar.get().archiveFile)
dependsOn(tasks.shadowJar) // Ughr. dependsOn(tasks.shadowJar) // Ughr.
mainFile.changelog = "Release notes can be found on the [GitHub repository](https://github.com/cc-tweaked/CC-Tweaked/releases/tag/v$mcVersion-$modVersion)." mainFile.changelog = "Release notes can be found on the [GitHub repository](https://github.com/cc-tweaked/CC-Tweaked/releases/tag/v$mcVersion-$modVersion)."
mainFile.changelogType = "markdown" mainFile.changelogType = "markdown"
@ -445,6 +445,8 @@ publishing {
repositories { repositories {
maven("https://squiddev.cc/maven") { maven("https://squiddev.cc/maven") {
name = "SquidDev" name = "SquidDev"
credentials(PasswordCredentials::class)
} }
} }
} }

View File

@ -26,12 +26,12 @@ abstract class CCTweakedExtension(
) { ) {
/** Get the hash of the latest git commit. */ /** Get the hash of the latest git commit. */
val gitHash: Provider<String> = gitProvider(project, "<no git hash>") { val gitHash: Provider<String> = gitProvider(project, "<no git hash>") {
ProcessHelpers.captureOut("git", "-C", project.projectDir.absolutePath, "rev-parse", "HEAD") ProcessHelpers.captureOut("git", "-C", project.projectDir.absolutePath, "rev-parse", "HEAD").trim()
} }
/** Get the current git branch. */ /** Get the current git branch. */
val gitBranch: Provider<String> = gitProvider(project, "<no git branch>") { val gitBranch: Provider<String> = gitProvider(project, "<no git branch>") {
ProcessHelpers.captureOut("git", "-C", project.projectDir.absolutePath, "rev-parse", "--abbrev-ref", "HEAD") ProcessHelpers.captureOut("git", "-C", project.projectDir.absolutePath, "rev-parse", "--abbrev-ref", "HEAD").trim()
} }
/** Get a list of all contributors to the project. */ /** Get a list of all contributors to the project. */