Skip to content

Instantly share code, notes, and snippets.

@j5ik2o j5ik2o/gist:950506
Created May 1, 2011

Embed
What would you like to do?
sbtでversionが-SNAPSHOTの場合にpublishToをsnapshotに切り替える方法
import sbt._
class MyProject(info: ProjectInfo) extends DefaultProject(info) {
override def managedStyle = ManagedStyle.Maven
// publishing
lazy val publishTo = if (version.toString.endsWith("-SNAPSHOT")){
println("Selected Snapshot")
Resolver.sftp("Tricreo Repo", "maven.tricreo.jp", "/var/www/maven.tricreo.jp/snapshot")
}else{
println("Selected Release")
Resolver.sftp("Tricreo Repo", "maven.tricreo.jp", "/var/www/maven.tricreo.jp/release")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.