Skip to content

Commit

Permalink
Fix the build system to allow releases (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebort authored Jun 21, 2017
1 parent c14779f commit 7ff5eef
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: scala
script: sbt test
script: sbt +test
jdk:
- oraclejdk8
env:
Expand All @@ -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
Expand Down
27 changes: 25 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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 := {
<url>https://github.com/criteo/cuttle</url>
<licenses>
<license>
<name>Apache 2</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git:github.com/criteo/cuttle.git</connection>
<developerConnection>scm:git:git@github.com:criteo/cuttle.git</developerConnection>
<url>github.com/criteo/cuttle</url>
</scm>
},
// Useful to run flakey tests
commands += Command.single("repeat") { (state, arg) =>
arg :: s"repeat $arg" :: state
Expand Down Expand Up @@ -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"))
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 7ff5eef

Please sign in to comment.