Skip to content

Commit

Permalink
Merge pull request #29 from alexarchambault/topic/sbt-ci-release
Browse files Browse the repository at this point in the history
Set up sbt-ci-release
  • Loading branch information
alexarchambault authored Sep 27, 2018
2 parents aa0a75d + a52a28d commit cfaa246
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
20 changes: 14 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
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
# http://www.scala-sbt.org/0.13/docs/Travis-CI-with-sbt.html
- 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:
Expand Down
34 changes: 14 additions & 20 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]",
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")

Expand All @@ -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:[email protected]: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 = "[email protected]",
id = "lihaoyi",
name = "Li Haoyi",
url = url("https://github.com/lihaoyi")
)
3 changes: 1 addition & 2 deletions project/build.sbt
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit cfaa246

Please sign in to comment.