Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle releases on Travis CI via sbt-ci-release #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
build/
.gradle/
out/

target/
19 changes: 18 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
language: java
language: scala
jdk: openjdk8
git:
depth: false
cache:
directories:
- $HOME/.cache
- $HOME/.ivy2/cache
- $HOME/.sbt
stages:
- name: test
- name: release
if: (branch = master AND type = push) OR (tag IS present)
jobs:
include:
- script: sbt test
- stage: release
script: sbt ci-release
36 changes: 36 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

inThisBuild(List(
organization := "org.jupyter",
homepage := Some(url("https://github.com/jupyter/jvm-repr")),
licenses := List("BSD-3-Clause" -> url("https://opensource.org/licenses/BSD-3-Clause")),
developers := List(
Developer(
"jvm-repr",
"jvm-repr contributors",
"",
url("https://github.com/jupyter/jvm-repr/graphs/contributors")
)
)
))

name := "jvm-repr"

// pure java project
autoScalaLibrary := false
crossVersion := CrossVersion.disabled

// test stuff
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test"
fork.in(Test) := true // seems required for the tests to run fine

// sbt-dynver doesn't generate correct versions, because tags don't have a
// 'v' prefix, so we're overriding its logic here
version := {
import sys.process._
val describe = Seq("git", "describe", "--tags").!!.trim
val latestTag = Seq("git", "describe", "--tags", "--abbrev=0").!!.trim
if (describe == latestTag)
describe
else
describe + "-SNAPSHOT"
}
1 change: 1 addition & 0 deletions project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.2.8
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.2.2")