Permalink
Browse files

Setup publishing to the sbt community plugins repo

  • Loading branch information...
1 parent 5dbf625 commit 396e82586fb116044d4a547934f2daa8b096dc0c @gseitz gseitz committed May 17, 2012
Showing with 10 additions and 1 deletion.
  1. +10 −1 build.sbt
View
@@ -8,4 +8,13 @@ unmanagedSourceDirectories in Compile <+= (sbtVersion, sourceDirectory in Compil
sbtPlugin := true
-publishTo := Some(Resolver.file("gseitz@github", file(Path.userHome + "/dev/repo")))
+publishTo <<= (version) { version: String =>
+ val scalasbt = "http://scalasbt.artifactoryonline.com/scalasbt/"
+ val (name, url) = if (version.contains("-SNAPSHOT"))
+ ("sbt-plugin-snapshots", scalasbt+"sbt-plugin-snapshots")
+ else
+ ("sbt-plugin-releases", scalasbt+"sbt-plugin-releases")
+ Some(Resolver.url(name, new URL(url))(Resolver.ivyStylePatterns))
+}
+
+publishMavenStyle := false

0 comments on commit 396e825

Please sign in to comment.