Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-shuy committed Nov 10, 2018
2 parents 4161df3 + 441c346 commit 28c8567
Show file tree
Hide file tree
Showing 26 changed files with 166 additions and 8 deletions.
8 changes: 3 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ organization := "com.github.daniel-shuy"

name := "sbt-scripted-scalatest"

version := "1.1.0-SNAPSHOT"

licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt"))

homepage := Some(url("https://github.com/daniel-shuy/scripted-scalatest-sbt-plugin"))

crossSbtVersions := Seq(
"0.13.16",
"1.1.0"
"0.13.17",
"1.2.6"
)

libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.5"
"org.scalatest" %% "scalatest" % "3.0.0"
)
2 changes: 1 addition & 1 deletion project/bintray.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.2")
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4")
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.1.0
sbt.version = 1.2.6
1 change: 1 addition & 0 deletions project/release.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.github.gseitz" % "sbt-release" % "1.0.10")
4 changes: 4 additions & 0 deletions publish.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
publishMavenStyle := false

bintrayRepository := "sbt-plugins"

bintrayPackageLabels := Seq("sbt", "sbt-plugin", "sbt-test", "scripted", "scripted-plugin", "scalatest")

bintrayReleaseOnPublish := false
16 changes: 16 additions & 0 deletions release.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import ReleaseTransformations._
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
releaseStepCommandAndRemaining("^ test"),
releaseStepCommandAndRemaining("^ scripted"),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
releaseStepCommandAndRemaining("^ publish"),
releaseStepTask(bintrayRelease),
setNextVersion,
commitNextVersion,
pushChanges
)
5 changes: 5 additions & 0 deletions scripted.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enablePlugins(SbtPlugin)
scriptedLaunchOpts := { scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
}
scriptedBufferLog := false
2 changes: 1 addition & 1 deletion src/main/scala/org/scalatest/ScriptedScalaTestSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ trait ScriptedScalaTestSuite extends Suite {
* @return [[org.scalatest.FailedStatus]] on error,
* else the return from [[org.scalatest.Suite.run(Option[String],org.scalatest.Args)]].
*/
def executeScripted(testName: String = null,
final def executeScripted(testName: String = null,
configMap: ConfigMap = ConfigMap.empty,
color: Boolean = true,
durations: Boolean = false,
Expand Down
32 changes: 32 additions & 0 deletions src/sbt-test/sbt-0.13/testFailure/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import com.github.daniel.shuy.sbt.scripted.scalatest.ScriptedScalaTestSuiteMixin
import org.scalatest.Assertions._
import org.scalatest.WordSpec

lazy val testFailure = project
.in(file("."))
.settings(
name := "test/sbt-0.13/testFailure",

ScriptedPlugin.scriptedSettings,
sys.props.get("plugin.version") match {
case Some(pluginVersion) => scriptedLaunchOpts := { scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-XX:MaxPermSize=256M", "-Dplugin.version=" + pluginVersion)
}
case _ => sys.error("""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
},
scriptedBufferLog := false,

scriptedScalaTestStacks := SbtScriptedScalaTest.FullStacks,
scriptedScalaTestSpec := Some(new WordSpec with ScriptedScalaTestSuiteMixin {
override val sbtState: State = state.value

"scripted" should {
"fail on ScalaTest failure" in {
assertThrows[sbt.Incomplete](
Project.extract(sbtState)
.runInputTask(scripted, "", sbtState))
}
}
})
)
1 change: 1 addition & 0 deletions src/sbt-test/sbt-0.13/testFailure/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version = 0.13.17
5 changes: 5 additions & 0 deletions src/sbt-test/sbt-0.13/testFailure/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sys.props.get("plugin.version") match {
case Some(pluginVersion) => addSbtPlugin("com.github.daniel-shuy" % "sbt-scripted-scalatest" % pluginVersion)
case _ => sys.error("""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
}
1 change: 1 addition & 0 deletions src/sbt-test/sbt-0.13/testFailure/project/scripted.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
libraryDependencies += { "org.scala-sbt" % "scripted-plugin" % sbtVersion.value }
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import com.github.daniel.shuy.sbt.scripted.scalatest.ScriptedScalaTestSuiteMixin
import org.scalatest.Assertions._
import org.scalatest.WordSpec

lazy val testBasicSimple = project
.in(file("."))
.settings(
name := "test/basic/simple",

scriptedScalaTestStacks := SbtScriptedScalaTest.FullStacks,
scriptedScalaTestSpec := Some(new WordSpec with ScriptedScalaTestSuiteMixin {
override val sbtState: State = state.value

"scripted test" should {
"fail" in {
fail()
}
}
})
)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version = 0.13.17
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sys.props.get("plugin.version") match {
case Some(pluginVersion) => addSbtPlugin("com.github.daniel-shuy" % "sbt-scripted-scalatest" % pluginVersion)
case _ => sys.error("""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> scriptedScalatest
1 change: 1 addition & 0 deletions src/sbt-test/sbt-0.13/testFailure/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> scriptedScalatest
32 changes: 32 additions & 0 deletions src/sbt-test/sbt-1.0/testFailure/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import com.github.daniel.shuy.sbt.scripted.scalatest.ScriptedScalaTestSuiteMixin
import org.scalatest.Assertions._
import org.scalatest.WordSpec

lazy val testFailure = project
.in(file("."))
.enablePlugins(SbtPlugin)
.settings(
name := "test/sbt-0.13/testFailure",

sys.props.get("plugin.version") match {
case Some(pluginVersion) => scriptedLaunchOpts := { scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + pluginVersion)
}
case _ => sys.error("""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
},
scriptedBufferLog := false,

scriptedScalaTestStacks := SbtScriptedScalaTest.FullStacks,
scriptedScalaTestSpec := Some(new WordSpec with ScriptedScalaTestSuiteMixin {
override val sbtState: State = state.value

"scripted" should {
"fail on ScalaTest failure" in {
assertThrows[sbt.Incomplete](
Project.extract(sbtState)
.runInputTask(scripted, "", sbtState))
}
}
})
)
1 change: 1 addition & 0 deletions src/sbt-test/sbt-1.0/testFailure/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version = 1.2.6
5 changes: 5 additions & 0 deletions src/sbt-test/sbt-1.0/testFailure/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sys.props.get("plugin.version") match {
case Some(pluginVersion) => addSbtPlugin("com.github.daniel-shuy" % "sbt-scripted-scalatest" % pluginVersion)
case _ => sys.error("""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import com.github.daniel.shuy.sbt.scripted.scalatest.ScriptedScalaTestSuiteMixin
import org.scalatest.Assertions._
import org.scalatest.WordSpec

lazy val testBasicSimple = project
.in(file("."))
.settings(
name := "test/basic/simple",

scriptedScalaTestStacks := SbtScriptedScalaTest.FullStacks,
scriptedScalaTestSpec := Some(new WordSpec with ScriptedScalaTestSuiteMixin {
override val sbtState: State = state.value

"scripted test" should {
"fail" in {
fail()
}
}
})
)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version = 1.2.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sys.props.get("plugin.version") match {
case Some(pluginVersion) => addSbtPlugin("com.github.daniel-shuy" % "sbt-scripted-scalatest" % pluginVersion)
case _ => sys.error("""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> scriptedScalatest
1 change: 1 addition & 0 deletions src/sbt-test/sbt-1.0/testFailure/test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
> scriptedScalatest
1 change: 1 addition & 0 deletions version.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version in ThisBuild := "1.1.0"

0 comments on commit 28c8567

Please sign in to comment.