Skip to content

Commit

Permalink
fix: Avoid error in GatlingSonatypePlugin when publish/skip := true
Browse files Browse the repository at this point in the history
  • Loading branch information
guilgaly committed Jan 29, 2024
1 parent 81837c1 commit 06e666a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ object GatlingSonatypePlugin extends AutoPlugin {
)

val conditionalPublishStep: ReleaseStep = { state: State =>
if (Project.extract(state).get(gatlingPublishToSonatype)) {
val extractedState = Project.extract(state)
val publishToSonatype = extractedState.get(gatlingPublishToSonatype)
val (_, publishSkip) = extractedState.runTask(publish / skip, state)

// publishStep(state) will fail when not actually publishing, hence the additional condition on publishSkip
if (publishToSonatype && !publishSkip) {
publishStep(state)
} else {
GatlingReleasePlugin.publishStep(state)
Expand Down

0 comments on commit 06e666a

Please sign in to comment.