From 708f3697eec1b9c642256f55347f083c6b372a28 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 30 Jun 2019 12:23:04 +0100 Subject: [PATCH] Release snapshots to sonatype from TravisCI (#92) * [sbt,travis] Deploy releases and snapshots to sonatype * [travis] remove oracle JDK builds * [travis] remove 'compile' job * [travis] Try adding scala 2.13 * [travis] test using openjdk8 rather than 10 * [travis] force use of scala version, overriding sbt version * Revert "[travis] Try adding scala 2.13" This reverts commit 6725199e009ae1f809247bbc0851b62d63121993. * Revert "[travis] force use of scala version, overriding sbt version" This reverts commit 21c94992f40cf2ef39c5126e67b66feaabe1b2c0. * [sbt] Group modules under n.k.thorp organisation --- .travis.yml | 30 ++++++++++++++++++++++++++++++ build.sbt | 17 +++++++++++++++-- project/plugins.sbt | 1 + 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8f13670..f19613c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,33 @@ language: scala +scala: + - 2.12.8 +jdk: + - openjdk8 + - openjdk11 env: - AWS_REGION=eu-west-1 +before_install: + - git fetch --tags +stages: + - name: test + - name: release + if: ((branch = master AND type = push) OR (tag IS present)) AND NOT fork +jobs: + include: + - stage: test + script: sbt ++$TRAVIS_SCALA_VERSION test + - stage: release + script: sbt ++$TRAVIS_SCALA_VERSION ci-release +cache: + directories: + - $HOME/.sbt/1.0/dependency + - $HOME/.sbt/boot/scala* + - $HOME/.sbt/launchers + - $HOME/.ivy2/cache + - $HOME/.coursier +before_cache: + - du -h -d 1 $HOME/.ivy2/cache + - du -h -d 2 $HOME/.sbt/ + - find $HOME/.sbt -name "*.lock" -type f -delete + - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete + - rm -rf $HOME/.ivy2/local diff --git a/build.sbt b/build.sbt index 3e288d3..1c55338 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,19 @@ -val commonSettings = Seq( - version := "DEV-SNAPSHOT", +inThisBuild(List( organization := "net.kemitix", + homepage := Some(url("https://github.com/kemitix/thorp")), + licenses := List("mit" -> url("https://opensource.org/licenses/MIT")), + developers := List( + Developer( + "kemitix", + "Paul Campbell", + "pcampbell@kemitix.net", + url("https://github.kemitix.net") + ) + ) +)) + +val commonSettings = Seq( + organization := "net.kemitix.thorp", scalaVersion := "2.12.8", test in assembly := {} ) diff --git a/project/plugins.sbt b/project/plugins.sbt index c03f03a..ae2407b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1 +1,2 @@ addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.3.2") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.2.6")