Skip to content

Conversation

eed3si9n
Copy link
Member

skip in publish when set to true will skip publish, publishLocal, and publishM2. (sbt-pgp already skips publishSigned).

Fixes #3136

`skip in publish` when set to `true` will skip publish, publishLocal, and publishM2. (sbt-pgp already skips publishSigned).

Fixes sbt#3136
@eed3si9n eed3si9n requested a review from dwijnand July 28, 2017 02:07
Copy link
Member

@jvican jvican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

def publishTask(config: TaskKey[PublishConfiguration],
deliverKey: TaskKey[_]): Initialize[Task[Unit]] =
Def.task {
IvyActions.publish(ivyModule.value, config.value, streams.value.log)
Def.taskDyn {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this will make the previous direct dependencies disappear, and introduces dynamic dependencies that are not visible to inspect. Every time I see this I become more convinced that we need a dynamic inspect, as LAMP proposed some time ago.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, I was just trying to make sense of the task graph for publish with inspect, now I know why I can't…

@eed3si9n eed3si9n merged commit b38dbc3 into sbt:1.0.0 Jul 28, 2017
@eed3si9n eed3si9n deleted the wip/skipinpublish branch July 28, 2017 22:46
@eed3si9n eed3si9n mentioned this pull request Jul 28, 2017
rtyley added a commit to guardian/etag-caching that referenced this pull request Sep 20, 2023
Since sbt v1.0 (!), `publish / skip` has been supported as a way of
suppressing publishing-actions (eg, for root projects when all we want
to publish are the sub-projects, not the root aggregate project).

It's set like this:

```
publish / skip := true
```

...and it's now preferred to `publishArtifact := false`:

sbt/sbt#3136 (comment)

See also:

* sbt/sbt#3136
* sbt/sbt#3380
* https://www.scala-sbt.org/1.x/docs/Publishing.html#Skip+publishing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants