From cfddffa1bf16a9b0d1b4982d92b7e03cf6cb0175 Mon Sep 17 00:00:00 2001 From: "Kenneth J. Shackleton" Date: Tue, 9 Jan 2024 09:34:08 +0000 Subject: [PATCH] Simplify isRelease property. Signed-off-by: Kenneth J. Shackleton --- .github/workflows/publication.yml | 3 +-- buildSrc/src/main/kotlin/SelektExtensions.kt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publication.yml b/.github/workflows/publication.yml index 8d0ecc9334..8b13e23b17 100644 --- a/.github/workflows/publication.yml +++ b/.github/workflows/publication.yml @@ -47,7 +47,6 @@ jobs: ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} run: | ./gradlew \ - -Prelease=false \ publishMainPublicationToSonatypeRepository \ closeSonatypeStagingRepository - name: 'Publish release to OSSRH' @@ -60,6 +59,6 @@ jobs: ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} run: | ./gradlew \ - -Prelease=true \ + -Prelease \ publishMainPublicationToSonatypeRepository \ closeAndReleaseSonatypeStagingRepository diff --git a/buildSrc/src/main/kotlin/SelektExtensions.kt b/buildSrc/src/main/kotlin/SelektExtensions.kt index 2d712284de..aa8d7cb67f 100644 --- a/buildSrc/src/main/kotlin/SelektExtensions.kt +++ b/buildSrc/src/main/kotlin/SelektExtensions.kt @@ -44,7 +44,7 @@ fun Project.gitCommitShort(): Provider = providers.exec { commandLine("git", "rev-parse", "--short", "HEAD") }.standardOutput.asText -fun Project.isRelease() = "true" == properties["release"] +fun Project.isRelease() = hasProperty("release") fun Project.resolvedOSSSonatypeURI() = URI(if (isRelease()) { "https://oss.sonatype.org/service/local/staging/deploy/maven2"