From 69ac50843b4e4ceedeef313116d8356da02ea645 Mon Sep 17 00:00:00 2001 From: Richard Dallaway Date: Fri, 23 Dec 2016 12:45:53 +0000 Subject: [PATCH] Add Travis build (#8) * Add travis build * Add travis build --- .travis.yml | 15 +++++++++++++++ README.md | 26 +++++++++++++++++--------- travis-publish.sh | 10 ++++++++++ 3 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 .travis.yml create mode 100755 travis-publish.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..40f61d9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +language: scala +jdk: +- oraclejdk8 +cache: + directories: + - "$HOME/.ivy2/cache" + - "$HOME/.sbt" +script: +- sbt +test +package +after_success: +- "./travis-publish.sh" +env: + global: + - secure: TaINWxuMPpYpCaLx3OJjWSqsa71BoJasZUU/miKNUQ6cpge1Ame3Ex3O2T36vxWhsISsaBeszts5A4K4c5+aSehqRkZ5ihkhM1BB/QQ6imi/y8kpAUez0EmZhArZbEE3Vyh9t8Uunez8obS40K/xiFF4ikDUd3xajGiAmEzq5Hg= + - secure: gzMd1I/GOVeqlEgIolEsF9CZWOgOXhDqawzYzIREJsqK1gG0NLLM/PWzXtY4Y+/YHSSt+buvMPm7Dst1/bItK/3ZnxccXFimEiLQdIZrPhcT43ev4xX4v+10wO3rJMbrLTGZlPUifAeDiFOI89y8VHHFF2VqqIf739DsrGZe4JE= diff --git a/README.md b/README.md index b418767..f3d1b76 100644 --- a/README.md +++ b/README.md @@ -5,19 +5,28 @@ This module provides "a state machine that allows you to define transition rules For use with Mapper. -To include this module in your Lift project, update your `libraryDependencies` in `build.sbt` to include: +Installation +------------ -*Lift 2.5.x* for Scala 2.9 and 2.10: +To include this module in your Lift project, add the following to `build.sbt`: - "net.liftmodules" %% "machine_2.5" % "1.2" + libraryDependencies += "net.liftmodules" %% "machine_3.0" % "1.3.0" -*Lift 2.6.x* for Scala 2.9, 2.10 and 2.11: +### Releases - "net.liftmodules" %% "machine_2.6" % "1.3-SNAPSHOT" -*Lift 3.0.x* for Scala 2.10: +| Lift Version | Scala Version | Module Version | +|--------------|---------------|----------------| +| 3.0.x | 2.11, 2.10 | 1.3 | +| 2.5.x | 2.10, 2.9 | 1.2 | - "net.liftmodules" %% "machine_3.0" % "1.2-SNAPSHOT" + +### Historic Snapshots + +| Lift Version | Scala Version | Module Version | +|--------------|-----------------|----------------| +| 2.6.x | 2.11, 2.9, 2.10 | 1.3-SNAPSHOT | +| 3.0.x | 2.10 | 1.2-SNAPSHOT | Documentation @@ -31,5 +40,4 @@ Documentation Notes for module developers =========================== -* The [Jenkins build](https://liftmodules.ci.cloudbees.com/job/machine/) is triggered on a push to master. - +Merge to master will trigger a Travis build and publish a SNAPSHOT (if the version is a -SNAPSHOT). diff --git a/travis-publish.sh b/travis-publish.sh new file mode 100755 index 0000000..bde2354 --- /dev/null +++ b/travis-publish.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Automatically publish snapshots for branches pushed to master. + +if [[ "${TRAVIS_PULL_REQUEST}" == "false" && + "${TRAVIS_BRANCH}" == "master" && + $(cat build.sbt) =~ "-SNAPSHOT" +]]; then + sbt +publish +fi