-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from Dwolla/cross-sbt
cross-build for sbt 0.13 and 1.0
- Loading branch information
Showing
13 changed files
with
120 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,43 @@ | ||
services: docker | ||
sudo: true | ||
dist: trusty | ||
sudo: required | ||
language: scala | ||
|
||
scala: | ||
- 2.10.6 | ||
cache: | ||
directories: | ||
- $HOME/.ivy2/cache | ||
- $HOME/.sbt/boot/ | ||
before_cache: | ||
# Tricks to avoid unnecessary cache updates | ||
- find $HOME/.ivy2 -name "ivydata-*.properties" -delete | ||
- find $HOME/.sbt -name "*.lock" -delete | ||
|
||
script: sbt ++$TRAVIS_SCALA_VERSION pipeline | ||
env: | ||
global: | ||
- secure: "Nw9jhj8Kt/ApiBpDuTd12Fqvs2eBspV5ZjQYsUXDipT7XzdLOhPE7WHD6xtC7X3MJRFtwXddq/Ud0NFxcqqfUwInRk51zPVoBr1eLY55Xz8ChXEmdkh/Vig1IW9YTkko5m7urPSK6zEFYdv3uTjkr6Pb1ZnVnt9mwHmLrSxP40Nremy812ZJTw7DhFf1y1/rq6EvsiBb2ifBW/vaWrSk3uWm1UAHFOP4vsuUqguamXAz2KSfxbac6aZQskHsGoc/hBGic1Kon/ZC+dexl+YEte4I56HtnddaR8dHRiKUOmf6JUck8DSJbLMEWGuzt4tVJrA7VLQo3R46QbIv1rQEPB9RVVQQs/aK9WonLrn2sIkoE7QhAKcN6YzLpCvElcl5+j2Uu6frMZUTwuxhOpKMgOZbKFqzqj2G3HaeK89dsOKHtv50T3bM61A7aHhYlN34EuiKPAriub76yzRdNUOsjz3mSfRKvEyQspgl3qVHwCaGV2ls6WlnCCVnaTW2EMuTf3WlcOUTVUG3sk8LgWNiGQ+FZx6OgeCL4XHhgSmUtpUcXuv3qkjfrtM/lp0Z+IKco8vqaXWgZkDqP49GhO5ncyPec+IcopmEZsUVlf3u++zdJbjymLuQDVruWkTkttHgyvqMpxkCTQTIbP0hMebtkzVfvVVyhfnnuwasGM3m17M=" | ||
|
||
matrix: | ||
include: | ||
- env: SBT_VERSION="0.13.16" | ||
jdk: openjdk7 | ||
- env: SBT_VERSION="1.0.0" | ||
jdk: oraclejdk8 | ||
|
||
script: | ||
- sbt "^^${SBT_VERSION}" pipeline | ||
|
||
before_deploy: | ||
- mkdir -p $HOME/.bintray | ||
- openssl aes-256-cbc -K $encrypted_0fde879eb030_key -iv $encrypted_0fde879eb030_iv -in .credentials.enc -out $HOME/.bintray/.credentials -d | ||
|
||
deploy: | ||
provider: script | ||
script: sbt publish | ||
on: | ||
branch: master | ||
- provider: script | ||
script: .travis/release.sh | ||
on: | ||
branch: master | ||
condition: $SBT_VERSION == "1.0.0" && $(git log -n1 --format=format:"%an") != "Dwolla Bot" | ||
- provider: script | ||
script: sbt "^^${SBT_VERSION}" publish | ||
on: | ||
tags: true | ||
condition: $(git log -n1 --format=format:"%an") == "Dwolla Bot" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit -o nounset | ||
|
||
USERNAME="Dwolla Bot" | ||
|
||
commit_username=$(git log -n1 --format=format:"%an") | ||
if [[ "$commit_username" == "$USERNAME" ]]; then | ||
echo "Refusing to release a commit created by this script." | ||
exit 0 | ||
fi | ||
|
||
if [ "$TRAVIS_BRANCH" != "master" ]; then | ||
echo "Only the master branch will be released. This branch is $TRAVIS_BRANCH." | ||
exit 0 | ||
fi | ||
|
||
git config user.name "$USERNAME" | ||
git config user.email "[email protected]" | ||
|
||
git remote add release https://$GH_TOKEN@github.com/Dwolla/sbt-docker-containers.git | ||
git fetch release | ||
|
||
git clean -dxf | ||
git checkout master | ||
git branch --set-upstream-to=release/master | ||
|
||
MASTER=$(git rev-parse HEAD) | ||
if [ "$TRAVIS_COMMIT" != "$MASTER" ]; then | ||
echo "Checking out master set HEAD to $MASTER, but Travis was building $TRAVIS_COMMIT, so refusing to continue." | ||
exit 0 | ||
fi | ||
|
||
sbt clean "release with-defaults" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version = 0.13.12 | ||
sbt.version=0.13.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
logLevel := Level.Warn | ||
|
||
libraryDependencies <+= sbtVersion { sv ⇒ | ||
"org.scala-sbt" % "scripted-plugin" % sv | ||
} | ||
libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value | ||
|
||
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0") | ||
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.1") | ||
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.6") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
scriptedLaunchOpts := { scriptedLaunchOpts.value ++ | ||
Seq("-Xmx1024M", "-XX:MaxPermSize=256M", "-Dplugin.version=" + version.value) | ||
} | ||
scriptedBufferLog := false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/scala/com/dwolla/sbt/docker/model/DockerProcessBuilder.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...-test/docker-containers/can-be-enabled-without-explicit-settings/project/build.properties
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
...test/docker-containers/clean-can-run-without-existing-containers/project/build.properties
This file was deleted.
Oops, something went wrong.
13 changes: 6 additions & 7 deletions
13
src/test/scala/com/dwolla/sbt/docker/DockerContainerPluginSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version in ThisBuild := "1.2.12-SNAPSHOT" |