From 749c69d8cbdede9df1a4b276c9478c667452f57b Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Thu, 27 Sep 2018 14:27:32 +0200 Subject: [PATCH 1/2] Remove sbt-travisci It seems not to be too fine with stages --- build.sbt | 3 +++ project/build.sbt | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 28015d0..54afc16 100644 --- a/build.sbt +++ b/build.sbt @@ -4,6 +4,9 @@ name := "acyclic" version := "0.1.8" +scalaVersion := "2.12.6" +crossScalaVersions := Seq("2.10.7", "2.11.12", "2.12.6", "2.13.0-M5") + resolvers += Resolver.sonatypeRepo("releases") libraryDependencies ++= Seq( diff --git a/project/build.sbt b/project/build.sbt index 1d9667a..7727945 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") From a52a28d01cfac6faecd3a01da4fd08bbb0b75f13 Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Thu, 27 Sep 2018 14:23:40 +0200 Subject: [PATCH 2/2] Set up sbt-ci-release --- .travis.yml | 20 ++++++++++++++------ build.sbt | 31 +++++++++++-------------------- project/build.sbt | 2 +- 3 files changed, 26 insertions(+), 27 deletions(-) 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 54afc16..c158118 100644 --- a/build.sbt +++ b/build.sbt @@ -1,8 +1,17 @@ -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") @@ -31,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 7727945..59f1f98 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -1,2 +1,2 @@ -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.2.1")