Skip to content

Instantly share code, notes, and snippets.

@jeffreyolchovy
Created May 29, 2017 14:43
Show Gist options
  • Save jeffreyolchovy/6250b0cfea92d109ec71a534b95f0ab6 to your computer and use it in GitHub Desktop.
Save jeffreyolchovy/6250b0cfea92d109ec71a534b95f0ab6 to your computer and use it in GitHub Desktop.
import sbt._
import sbt.Keys._
import sbtrelease.ReleasePlugin.autoImport._
import sbtrelease.ReleaseStateTransformations._
object Publishing {
/* `publish` performs a no-op */
val NoopPublishSettings = Seq(
packagedArtifacts in RootProject(file(".")) := Map.empty,
publish := (),
publishLocal := (),
publishArtifact := false,
publishTo := None
)
val PublishSettings = Seq(
autoAPIMappings := true,
pomIncludeRepository := { _ => false },
publishArtifact in Test := false,
publishArtifact in (Compile, packageDoc) := true,
publishArtifact in (Compile, packageSrc) := true
)
val ReleaseSettings = NoopPublishSettings ++ Seq(
releaseProcess := Seq[ReleaseStep](
releaseStepCommandAndRemaining("+test"),
releaseStepCommandAndRemaining("+publishLocal")
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment