Permalink
Browse files

Merge pull request #29 from typesafehub/wip/publish-to-s3

Adding S3 upload for release management.
  • Loading branch information...
2 parents c500876 + 71e484d commit 8419da1ff267d8996149f03ce75c6fd797cf8b90 @dotta dotta committed Feb 6, 2013
Showing with 30 additions and 2 deletions.
  1. +15 −0 README.md
  2. +13 −2 project/Build.scala
  3. +2 −0 project/plugins.sbt
View
@@ -142,6 +142,21 @@ Tests within the `functional-tests` folder should always pass.
Note: The `problems.txt` is the test oracle. Expected errors are declared using the Mima's reporting output (i.e., the output of the tool and the expected errors should match perfectly). Admittedly, this coupling is an issue since the testing framework is highly coupled with the tool output used to report errors to the user. We should improve this and make the two independent. Until then, mind that by changing the output of the tool you will likely have to update some of the test oracles (i.e., problems.txt file).
+Releasing
+---------
+MiMa releases to several different locations:
+
+1. Maven central (libraries)
+2. repo.scala-sbt.org (sbt plugin)
+3. downloads.typesafe.com (bundled CLI + UI artifacts).
+
+To deploy to locations 1 and 2, simple use the `publish` task, but make sure your credentials for both Sonatype's OSSRH + repo.scala-sbt.org are in order. After deploying, you need to log in to [OSSRH](http://oss.sonatype.org) and close/release the repository.
+
+To deploy to downloads.typesafe.com, you need to run the `s3-upload` task, ensuring the appropriate credentials are in place (See [sbt-s3](https://github.com/sbt/sbt-s3) for more info).
+
+MiMa releases should also update the content found on the [Typesafe Website](http://typesafe.com/technology/migration-manager).
+
+
FAQ
-------
View
@@ -11,6 +11,8 @@ import sbtassembly.Plugin.AssemblyKeys._
import sbtassembly.Plugin.assemblySettings
import sbtassembly.Plugin.MergeStrategy
import sbtbuildinfo.Plugin._
+import com.typesafe.sbt.S3Plugin._
+import S3._
object BuildSettings {
@@ -28,7 +30,6 @@ object BuildSettings {
homepage := Some(url("http://github.com/typesafehub/migration-manager"))
)
-
def sbtPublishSettings: Seq[Setting[_]] = Seq(
publishMavenStyle := false,
publishTo <<= (version) { version: String =>
@@ -92,8 +93,18 @@ object MimaBuild extends Build {
lazy val root = (
Project("root", file("."), aggregate = modules.map(Reference.projectToRef(_)))
+ settings(s3Settings:_*)
settings(publish := (),
- publishLocal := ())
+ publishLocal := (),
+ mappings in upload <<= (assembly in reporter, assembly in reporterui) map { (cli, ui) =>
+ def loc(name: String) = "migration-manager/%s/%s-%s.jar" format (buildVersion, name, buildVersion)
+ Seq(
+ cli -> loc("migration-manager-cli"),
+ ui -> loc("migration-manager-ui")
+ )
+ },
+ host in upload := "downloads.typesafe.com.s3.amazonaws.com"
+ )
)
lazy val core = (
View
@@ -2,5 +2,7 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.3")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.1.2")
+addSbtPlugin("com.typesafe.sbt" % "sbt-s3" % "0.1")
+
resolvers += Resolver.url("sbt-plugin-releases",
new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)

0 comments on commit 8419da1

Please sign in to comment.