Skip to content

Commit 55cfabe

Browse files
author
Travis CI User
committed
Merge branch 'release/1.1.1'
2 parents 64d1d0c + 4d79dba commit 55cfabe

File tree

7 files changed

+66
-24
lines changed

7 files changed

+66
-24
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ project/plugins/project/
4747

4848
# IntelliJ
4949
/out/
50+
.idea/**
5051

5152
# mpeltonen/sbt-idea plugin
5253
.idea_modules/

.travis.yml

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,50 @@
1+
# See https://www.scala-sbt.org/1.x/docs/Travis-CI-with-sbt.html
2+
13
# Use container-based infrastructure
24
sudo: false
35

46
language: scala
57

8+
# Ubuntu Trusty (https://docs.travis-ci.com/user/reference/trusty/)
9+
dist: trusty
10+
11+
jobs:
12+
include:
13+
- name: test
14+
if: (NOT branch =~ /^release\/.*$/)
15+
# When running scripted tests targeting multiple SBT versions, we must first publish locally for all SBT versions
16+
script: sbt "^ publishLocal" "^ scripted"
17+
- name: release
18+
if: (branch =~ /^release\/.*$/)
19+
env:
20+
- BINTRAY_USER=daniel-shuy
21+
# BINTRAY_PASS
22+
- secure: KgOgPWelim4ySIKAe24WsRGicwcHzqEADql8flUXDyq21aQ+cz0eYkeg/jjkP7jGwHIfBnYNvnhKw/Diiea9X50tHngRTOlRUGpO948yDpTyVCtlRig9A71BafSdi/Ps6P0sPUaC76SKOWY+Zk1WmwMozebgXiY2hjCuE68jnq5xbOydFqfamHRke49AwZuxZPJ2+CCxCB03Hla8Kbd0XcFLp+ZhurPSURZc9/iB/CFz3kI47Tvv3R6Dl9Jjej8jNl//reIt75rSW0yVMk7YElkXZUr3F42r/4/eo4IrQW0gwBD44YOdIYZL+iOqD+Xpng0qlY0XXZ9B0KHLutMv2gYtkRcwNH6wtRoP2xOFaqbuBdWQpVd6E/aj0iPHzEQUb0EDyw0E731XEFzL1d8KxUgXn9eZj4qGB274XfShA3t4VE6eqq77ORJIMRmg0nwjLUhvx78RZqnZ+z1GUFmEjyIk3bGs07N9O0xD4w8dq6yXF3oxtIH1l3QznHA4XgV+fiz7ckOQJKSjRuRpvSllea2okf/vkZ0Wp5f9/16LzWznuKamqABwVaNvbOHbgkzInK8Nm8WN/52nZdmB3+Y18OQ6dN/thHjzsgYdZMHeUSCT1exnAhTmBujUN7LSXWHHtn9LW4qZw81xNLCEHH6ZxXVt6A8nBnYYhg9/9a7EobQ=
23+
# GH_TOKEN
24+
- secure: Twz0WAfQAaj0F0Em6tLYg5uJm8xgVAhtqiIRgrFk0bpyG+ekWuZdb4BVou4MeyHLhZYJ4fLb74Uhd3wltqTFQOem9VftcnxCDTlzVXL/4FvH817/L+cGqFJ5hm1IlvaibDy3eFSpxAJPukdeEEbaQgexFf5PX2pmofnC9hzO/RObFA3ApHG/9Yiuq6gxp0nCGlwU1iuzMmqsVZ1ntfWexAvJgj6mXVZV4yd+ef9qJnn5WWqu5s6oHYpX9kc6BITFdiBZeIrQFL+q3bW9kMMfRh22c4/qpIerxe0GkmrtGXw0ZODG2m74AUG7j6dtyi6o2hW8pAy09lhtROYVb0B1+uo9dShGM94SZy9YwT/75ffvdKiclyrBe+DKs2hU8N7x0KLfgqnW7C8a2eoweXwdYCtjL/qFvWELAPsAYGXoxoP7PsQkzUR4aPlaLORVO72nBQOGFXb/fJGkXOW6RHMGwhZngXIAMY3QzoTsKBv+7vSAcdq+sz4IO2J/0ej1ItRRD5sis7Y1Q4nT8o/yejP2RVBn+PSF8Rmgx1tQcVecxvhzPSibBJoMPs/ixtocC8X1nKLaLfkndpEVeiCuDbZ6hyP6z+EwdqB/mgy+exIscbhgFHX25xBULpjawmuw3dcSGTV8hGSVf8LSgcl+4ssffoejalNnUQcbDF7MT3WTae0=
25+
# Extract release version from branch name
26+
- RELEASE_VERSION=`echo $TRAVIS_BRANCH | sed --regexp-extended 's/^release\/(.*)$/\1/'`
27+
- GIT_MERGE_AUTOEDIT=no
28+
before_install:
29+
# git-flow AVH (https://github.com/petervanderdoes/gitflow-avh/wiki/Installing-on-Linux,-Unix,-etc.#user-content-ubuntu)
30+
- sudo add-apt-repository --yes ppa:pdoes/gitflow-avh
31+
# use add-apt-repository --update in Ubuntu 17+ (Artful)
32+
- sudo apt-get update
33+
- sudo apt-get --yes install git-flow
34+
install:
35+
- git remote set-url origin https://[email protected]/$TRAVIS_REPO_SLUG.git
36+
- git remote set-branches --add origin master
37+
- git remote set-branches --add origin develop
38+
- git fetch origin
39+
- git checkout --force -b master --track origin/master
40+
- git checkout --force -b develop --track origin/develop
41+
- git checkout --force $TRAVIS_BRANCH
42+
- git config gitflow.prefix.release release/
43+
- git flow init --defaults
44+
script: sbt "release release-version $RELEASE_VERSION with-defaults"
45+
# --message option is required to suppress editor prompt
46+
after_success: git flow release finish --showcommands --push --message 'Release'
47+
648
# These directories are cached to S3 at the end of the build
749
cache:
850
directories:
@@ -11,9 +53,6 @@ cache:
1153

1254
before_cache:
1355
# Cleanup the cached directories to avoid unnecessary cache updates
56+
- rm -fv $HOME/.ivy2/.sbt.ivy.lock
1457
- find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
1558
- find $HOME/.sbt -name "*.lock" -print -delete
16-
17-
script:
18-
# When running scripted tests targeting multiple SBT versions, we must first publish locally for all SBT versions
19-
- sbt "^ publishLocal" "^ scripted"

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# scripted-scalatest-sbt-plugin
22

33
[ ![Download](https://api.bintray.com/packages/daniel-shuy/sbt-plugins/sbt-scripted-scalatest/images/download.svg) ](https://bintray.com/daniel-shuy/sbt-plugins/sbt-scripted-scalatest/_latestVersion)
4-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/244276b4573e4ae899443fa79c34822b)](https://www.codacy.com/app/daniel-shuy/scripted-scalatest-sbt-plugin?utm_source=github.com&utm_medium=referral&utm_content=daniel-shuy/scripted-scalatest-sbt-plugin&utm_campaign=badger)
4+
5+
| Branch | Travis CI | Codacy |
6+
| ------- | --------- | ------ |
7+
| Master | [![Build Status](https://travis-ci.org/daniel-shuy/scripted-scalatest-sbt-plugin.svg?branch=master)](https://travis-ci.org/daniel-shuy/scripted-scalatest-sbt-plugin) | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/244276b4573e4ae899443fa79c34822b?branch=master)](https://www.codacy.com/app/daniel-shuy/scripted-scalatest-sbt-plugin?utm_source=github.com&utm_medium=referral&utm_content=daniel-shuy/scripted-scalatest-sbt-plugin&utm_campaign=Badge_Grade) |
8+
| Develop | [![Build Status](https://travis-ci.org/daniel-shuy/scripted-scalatest-sbt-plugin.svg?branch=develop)](https://travis-ci.org/daniel-shuy/scripted-scalatest-sbt-plugin) | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/244276b4573e4ae899443fa79c34822b?branch=develop)](https://www.codacy.com/app/daniel-shuy/scripted-scalatest-sbt-plugin?utm_source=github.com&utm_medium=referral&utm_content=daniel-shuy/scripted-scalatest-sbt-plugin&utm_campaign=Badge_Grade) |
59

610
| Plugin Version | SBT Version | ScalaTest Version |
711
| -------------- | ------------- | ----------------- |
@@ -22,15 +26,11 @@ This plugin allows you to use any of ScalaTest's test [Suites](http://www.scalat
2226
## Notes
2327
- Do not use ScalaTest's [ParallelTestExecution](http://doc.scalatest.org/3.0.0/index.html#org.scalatest.ParallelTestExecution) mixin with this plugin. `ScriptedScalaTestSuiteMixin` runs `sbt clean` before each test, which may cause weird side effects when run in parallel.
2428
- When executing SBT tasks in tests, use `Project.runTask(<task>, state.value)` instead of `<task>.value`. Calling `<task>.value` declares it as a dependency, which executes before the tests, not when the line is called.
25-
- When implementing [BeforeAndAfterEach](http://doc.scalatest.org/3.0.0/index.html#org.scalatest.BeforeAndAfterEach)'s `beforeEach`, make sure to invoke `super.beforeEach` in a `try` block, then put your implementation in the `finally` clause:
29+
- When implementing [BeforeAndAfterEach](http://doc.scalatest.org/3.0.0/index.html#org.scalatest.BeforeAndAfterEach)'s `beforeEach`, make sure to invoke `super.beforeEach` afterwards:
2630
```scala
2731
override protected def beforeEach(): Unit = {
28-
try {
29-
super.beforeEach()
30-
}
31-
finally {
32-
// ...
33-
}
32+
// ...
33+
super.beforeEach() // To be stackable, must call super.beforeEach
3434
}
3535
```
3636
- This SBT plugin is now tested using itself!
@@ -116,12 +116,12 @@ See http://www.scala-sbt.org/0.13/docs/Testing-sbt-plugins.html#step+3%3A+src%2F
116116

117117
Add the following to your `sbt-test/<test-group>/<test-name>/project/plugins.sbt`:
118118
```scala
119-
addSbtPlugin("com.github.daniel-shuy" % "sbt-scripted-scalatest" % "1.1.0")
119+
addSbtPlugin("com.github.daniel-shuy" % "sbt-scripted-scalatest" % "1.1.1")
120120
```
121121

122122
Override the `scalatest` dependency version with the version of ScalaTest you wish to use:
123123
```scala
124-
addSbtPlugin("com.github.daniel-shuy" % "sbt-scripted-scalatest" % "1.1.0")
124+
addSbtPlugin("com.github.daniel-shuy" % "sbt-scripted-scalatest" % "1.1.1")
125125
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5"
126126
```
127127

@@ -189,7 +189,7 @@ Eg. Run `sbt scripted` on the main project to execute all tests.
189189

190190
## Licence
191191

192-
Copyright 2017, 2018 Daniel Shuy
192+
Copyright 2017, 2018, 2019 Daniel Shuy
193193

194194
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
195195

project/release.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.10")
1+
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.11")

release.sbt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
import ReleaseTransformations._
2+
3+
releaseIgnoreUntrackedFiles := true
4+
5+
releaseCommitMessage := s"[ci skip] ${releaseCommitMessage.value}"
6+
27
releaseProcess := Seq[ReleaseStep](
38
checkSnapshotDependencies,
49
inquireVersions,
@@ -9,7 +14,8 @@ releaseProcess := Seq[ReleaseStep](
914
releaseStepCommandAndRemaining("^ scripted"),
1015
setReleaseVersion,
1116
commitReleaseVersion,
12-
tagRelease,
17+
// don't tag, leave it to git flow
18+
// tagRelease,
1319
releaseStepCommandAndRemaining("^ publish"),
1420
releaseStepTask(bintrayRelease),
1521
setNextVersion,

src/main/scala/com/github/daniel/shuy/sbt/scripted/scalatest/ScriptedScalaTestSuiteMixin.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ trait ScriptedScalaTestSuiteMixin extends ScriptedScalaTestSuite with BeforeAndA
1010

1111
// run Clean before each test to restore project to a clean slate
1212
override protected def beforeEach(): Unit = {
13-
try {
14-
super.beforeEach()
15-
}
16-
finally {
17-
Project.runTask(Keys.clean, sbtState)
18-
}
13+
Project.runTask(Keys.clean, sbtState)
14+
super.beforeEach() // To be stackable, must call super.beforeEach
1915
}
2016
}

version.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version in ThisBuild := "1.1.1-SNAPSHOT"
1+
version in ThisBuild := "1.1.2-SNAPSHOT"

0 commit comments

Comments
 (0)