diff --git a/.travis.yml b/.travis.yml index b854eed..95a9390 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,8 @@ language: scala -scala: -- 2.10.7 -- 2.11.12 -- 2.12.6 -- 2.13.0-M5 jdk: - oraclejdk8 +before_install: + - git fetch --tags script: - sbt ++$TRAVIS_SCALA_VERSION "testOnly -- --truncate=999999" # Tricks to avoid unnecessary cache updates, from @@ -13,7 +10,18 @@ script: - find $HOME/.sbt -name "*.lock" | xargs rm - find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm sudo: false - +stages: + - name: test + - name: release + if: (branch = master AND type = push) OR (tag IS present) +jobs: + include: + - scala: 2.10.7 + - scala: 2.11.12 + - scala: 2.12.6 + - scala: 2.13.0-M5 + - stage: release + script: sbt ci-release # These directories are cached to S3 at the end of the build cache: directories: diff --git a/build.sbt b/build.sbt index 28015d0..c158118 100644 --- a/build.sbt +++ b/build.sbt @@ -1,8 +1,20 @@ -organization := "com.lihaoyi" name := "acyclic" -version := "0.1.8" +inThisBuild(List( + organization := "com.lihaoyi", + homepage := Some(url("https://github.com/lihaoyi/acyclic")), + licenses := Seq("MIT" -> url("http://www.opensource.org/licenses/mit-license.html")), + developers += Developer( + email = "haoyi.sg@gmail.com", + id = "lihaoyi", + name = "Li Haoyi", + url = url("https://github.com/lihaoyi") + ) +)) + +scalaVersion := "2.12.6" +crossScalaVersions := Seq("2.10.7", "2.11.12", "2.12.6", "2.13.0-M5") resolvers += Resolver.sonatypeRepo("releases") @@ -28,21 +40,3 @@ unmanagedSourceDirectories in Test += baseDirectory.value / "src" / "test" / "re // Sonatype publishArtifact in Test := false - -publishTo := Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2") - -scmInfo := Some(ScmInfo( - browseUrl = url("https://github.com/lihaoyi/acyclic"), - connection = "scm:git:git@github.com:lihaoyi/acyclic.git" -)) - -licenses := Seq("MIT" -> url("http://www.opensource.org/licenses/mit-license.html")) - -homepage := Some(url("https://github.com/lihaoyi/acyclic")) - -developers += Developer( - email = "haoyi.sg@gmail.com", - id = "lihaoyi", - name = "Li Haoyi", - url = url("https://github.com/lihaoyi") -) \ No newline at end of file diff --git a/project/build.sbt b/project/build.sbt index 1d9667a..59f1f98 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1,3 +1,2 @@ -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1") -addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.1.3") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.2.1")