Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
respect publishArtifact := false
Browse files Browse the repository at this point in the history
  • Loading branch information
bbstilson committed Dec 2, 2023
1 parent 7d51185 commit bbd6b07
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ object CodeArtifactPlugin extends AutoPlugin {
// See: https://www.scala-sbt.org/1.x/docs/Howto-Dynamic-Task.html
private def dynamicallyPublish: Def.Initialize[Task[Unit]] = Def.taskDyn {
val shouldSkip = (publish / skip).value
val publishEnabled = (publish / publishArtifact).value
val logger = streams.value.log
val ref = thisProjectRef.value

if (shouldSkip) Def.task {
if (shouldSkip || !publishEnabled) Def.task {
logger.debug(s"Skipping publish for ${ref.project}")
}
else publish0
Expand Down

0 comments on commit bbd6b07

Please sign in to comment.