Created
May 1, 2011 13:38
-
-
Save j5ik2o/950506 to your computer and use it in GitHub Desktop.
sbtでversionが-SNAPSHOTの場合にpublishToをsnapshotに切り替える方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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