Skip to content

Commit 455826b

Browse files
committed
fix release publish attempt #3
1 parent 435093a commit 455826b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ allprojects {
1818
return@let it.removePrefix("v")
1919
val lastTag = versionDetails().lastTag
2020
val tag =
21-
if(lastTag.startsWith("v")) lastTag.removePrefix("v")
21+
if (lastTag.startsWith("v")) lastTag.removePrefix("v")
2222
else "0.0.0"
2323
val lastNum = tag.split(".").last().toInt() + 1
2424
"${tag.split(".").subList(0, 2).joinToString(".")}.$lastNum-SNAPSHOT"
@@ -42,7 +42,9 @@ tasks.withType<PublishToMavenRepository> {
4242
doFirst {
4343
println("Publishing ${publication.groupId}:${publication.artifactId}:${publication.version} to ${repository.url}")
4444
}
45-
finalizedBy(tasks.closeAndReleaseStagingRepository)
45+
if (!(version as String).endsWith("SNAPSHOT")) {
46+
finalizedBy(tasks.closeAndReleaseStagingRepository)
47+
}
4648
}
4749

4850
allprojects {

semanticdb-kotlinc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ signing {
123123
}
124124

125125
tasks.withType<Sign>().configureEach {
126-
onlyIf { !(project.version as String).contains("SNAPSHOT") }
126+
onlyIf { !(project.version as String).endsWith("SNAPSHOT") }
127127
}
128128

129129
tasks.test {

0 commit comments

Comments
 (0)