Skip to content

Commit

Permalink
Simplify isRelease property.
Browse files Browse the repository at this point in the history
Signed-off-by: Kenneth J. Shackleton <[email protected]>
  • Loading branch information
kennethshackleton committed Jan 9, 2024
1 parent f756450 commit cfddffa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/publication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
run: |
./gradlew \
-Prelease=false \
publishMainPublicationToSonatypeRepository \
closeSonatypeStagingRepository
- name: 'Publish release to OSSRH'
Expand All @@ -60,6 +59,6 @@ jobs:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
run: |
./gradlew \
-Prelease=true \
-Prelease \
publishMainPublicationToSonatypeRepository \
closeAndReleaseSonatypeStagingRepository
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/SelektExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fun Project.gitCommitShort(): Provider<String> = 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"
Expand Down

0 comments on commit cfddffa

Please sign in to comment.