Skip to content

Commit 3ba0198

Browse files
committed
Skip sonatype staging for *-SNAPSHOT versions
1 parent 5d78715 commit 3ba0198

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ def hasSonatypeCredentials =
7070
&& sonatypePassword != null
7171
&& !sonatypePassword.toString().trim().isEmpty()
7272

73-
if (!hasSonatypeCredentials) {
74-
logger.lifecycle("Sonatype credentials not provided; skipping Nexus staging initialization and release tasks.")
73+
if (!hasSonatypeCredentials || project.version.endsWith("-SNAPSHOT")) {
74+
logger.lifecycle("Sonatype credentials not provided or running with snapshot; skipping Nexus staging initialization and release tasks.")
7575
def skipTheseTasks = [
7676
"initializeSonatypeStagingRepository",
7777
"publishToSonatype",

0 commit comments

Comments
 (0)