Skip to content

Commit

Permalink
Set up sbt-ci-release (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n authored Aug 12, 2020
1 parent 2518fad commit 85ff4ab
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 17 deletions.
37 changes: 26 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,37 @@
language: scala
matrix:

stages:
- name: test
- name: release
if: (tag IS present) AND NOT fork

jdk: openjdk8

jobs:
include:
- env: SBT_VERSION="1.3.9"
jdk: openjdk8
- env: SBT_VERSION="1.3.9"
jdk: openjdk11
# stage="test" if no stage is specified
- name: jdk8
jdk: openjdk8
- name: jdk11
jdk: openjdk11
# run ci-release only if previous stages passed
- stage: release
script: sbt ci-release

script: sbt "^^ $SBT_VERSION" clean test scripted
before_install:
- git fetch --tags

cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.cache/coursier
- $HOME/.sbt
script: sbt clean test scripted

before_cache:
# Cleanup the cached directories to avoid unnecessary cache updates
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
- find $HOME/.cache/coursier -name -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete

cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.cache/coursier
- $HOME/.sbt
9 changes: 8 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ lazy val specs2Version = "4.9.3"
// MANIFEST will however not make mention of the compileonly libs
val CompileOnly = config("compileonly").hide

ThisBuild / dynverSonatypeSnapshots := true
ThisBuild / version := {
val orig = (ThisBuild / version).value
if (orig.endsWith("-SNAPSHOT")) "2.2.0-SNAPSHOT"
else orig
}

lazy val `sbt-avro`: Project = project
.in(file("."))
.enablePlugins(SbtPlugin)
Expand All @@ -30,11 +37,11 @@ lazy val `sbt-avro`: Project = project
unmanagedClasspath in Compile ++= update.value.select(configurationFilter(CompileOnly.name)),

licenses += ("BSD 3-Clause", url("https://github.com/sbt/sbt-avro/blob/master/LICENSE")),
publishTo := (bintray / publishTo).value,
publishMavenStyle := false,
bintrayOrganization := Some("sbt"),
bintrayRepository := "sbt-plugin-releases",
bintrayPackage := "sbt-avro2",
bintrayReleaseOnPublish := false,

scriptedLaunchOpts := scriptedLaunchOpts.value ++ Seq(
"-Xmx1024M",
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.13")
addSbtPlugin("org.foundweekends" %% "sbt-bintray" % "0.5.6")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")
3 changes: 0 additions & 3 deletions project/scripted.sbt

This file was deleted.

1 change: 0 additions & 1 deletion version.sbt

This file was deleted.

0 comments on commit 85ff4ab

Please sign in to comment.