Skip to content

Commit

Permalink
allow releasing to Maven Central in release.sh
Browse files Browse the repository at this point in the history
This safety switch was added a little while back to avoid accidental publishing. Also removed some test code that was accidentally committed to prevent release when testing the property.

Signed-off-by: Peter Gafert <[email protected]>
  • Loading branch information
codecholeric committed Feb 20, 2022
1 parent 1961f27 commit 8f56568
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions build-steps/release/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ task setNextSnapshotVersion() {
}

releaseSonatypeStagingRepository.doFirst {
assert project.findProperty('activateReleaseToMavenCentral'): 'Release to Maven Central is disabled by default. Activate via \'-PactivateReleaseToMavenCentral\''
throw new RuntimeException("Bummer")
def activateReleasePropertyName = 'activateReleaseToMavenCentral'
assert project.findProperty(activateReleasePropertyName) != null:
"Release to Maven Central is disabled by default. Activate via '-P${activateReleasePropertyName}'"
}
2 changes: 1 addition & 1 deletion release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ git tag "v$VERSION"
git push origin "v$VERSION"

echo Publishing ArchUnit...
./gradlew clean publishArchUnit --no-parallel -PsonatypeUsername="$SONATYPE_USERNAME" -PsonatypePassword="$SONATYPE_PASSWORD" -PsigningKey="$GPG_SIGNING_KEY" -PsigningPassword="$GPG_SIGNING_PASSWORD"
./gradlew clean publishArchUnit --no-parallel -PactivateReleaseToMavenCentral -PsonatypeUsername="$SONATYPE_USERNAME" -PsonatypePassword="$SONATYPE_PASSWORD" -PsigningKey="$GPG_SIGNING_KEY" -PsigningPassword="$GPG_SIGNING_PASSWORD"

echo Publishing website and examples...
./gradlew publishDocs
Expand Down

0 comments on commit 8f56568

Please sign in to comment.