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 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbstilson committed Dec 2, 2023
1 parent 56f307f commit 1a5bbf2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,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 1a5bbf2

Please sign in to comment.