Skip to content

Commit

Permalink
Merge pull request #488 from kennethshackleton/simplify-is-release
Browse files Browse the repository at this point in the history
Simplify isRelease property.
  • Loading branch information
kennethshackleton authored Jan 9, 2024
2 parents f756450 + cfddffa commit bd75805
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 bd75805

Please sign in to comment.