diff --git a/.travis.yml b/.travis.yml index 63805c719..06b1da0e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: scala -script: sbt test +script: sbt +test jdk: - oraclejdk8 env: @@ -21,6 +21,13 @@ before_cache: - find $HOME/.sbt -name "*.lock" -print -delete before_script: - sudo chmod +x /usr/local/bin/sbt +deploy: + provider: script + script: sbt +publishSigned "sonatypeReleaseAll com.criteo" + skip_cleanup: true + on: + tags: true + branch: master cache: directories: - $HOME/.ivy2/cache diff --git a/build.sbt b/build.sbt index 481907f43..1ff340d12 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ val devMode = settingKey[Boolean]("Some build optimization are applied in devMode.") val writeClasspath = taskKey[File]("Write the project classpath to a file.") -val VERSION = "0.1.0-SNAPSHOT" +val VERSION = "0.1.0" lazy val commonSettings = Seq( organization := "com.criteo.cuttle", @@ -30,6 +30,29 @@ lazy val commonSettings = Seq( f }, // Maven config + credentials += Credentials( + "Sonatype Nexus Repository Manager", + "oss.sonatype.org", + "criteo-oss", + sys.env.getOrElse("SONATYPE_PASSWORD", "") + ), + pgpPassphrase := sys.env.get("SONATYPE_PASSWORD").map(_.toArray), + pgpSecretRing := file(".travis/secring.gpg"), + pgpPublicRing := file(".travis/pubring.gpg"), + pomExtra in Global := { + https://github.com/criteo/cuttle + + + Apache 2 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + scm:git:github.com/criteo/cuttle.git + scm:git:git@github.com:criteo/cuttle.git + github.com/criteo/cuttle + + }, // Useful to run flakey tests commands += Command.single("repeat") { (state, arg) => arg :: s"repeat $arg" :: state @@ -139,7 +162,7 @@ lazy val cuttle = pomPostProcess := removeDependencies("danburkert", "org.scalatest") ) .settings(addArtifact(artifact in (Compile, assembly), assembly): _*) - .dependsOn(continuum, localdb % "test->test") + .dependsOn(continuum) lazy val timeseries = (project in file("timeseries")) diff --git a/project/plugins.sbt b/project/plugins.sbt index f1388d6ae..f5bbb35c1 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,5 @@ addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.6.8") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.4") addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.0") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1") +addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")