Skip to content

Instantly share code, notes, and snippets.

@gseitz
Created July 23, 2011 19:20
Show Gist options
  • Save gseitz/1101775 to your computer and use it in GitHub Desktop.
Save gseitz/1101775 to your computer and use it in GitHub Desktop.
Hook up a task to be invoked before publish-local
import sbt._
import Keys._
object MyBuild extends Build {
lazy val beforeDeploy = TaskKey[Unit]("before-deploy", "will be invoked before deploy")
val externalProcess = "echo $HOME"
override lazy val settings: Seq[Setting[_]] = Seq[Setting[_]](
beforeDeploy <<= streams map (out => externalProcess ! out.log),
publishLocal <<= publishLocal dependsOn(beforeDeploy
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment