File tree Expand file tree Collapse file tree 6 files changed +19
-8
lines changed
src/sbt-test/sbt-coffeescript-plugin Expand file tree Collapse file tree 6 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ lazy val root = (project in file("."))
1111 " org.webjars.npm" % " coffeescript" % " 2.3.2" ,
1212 " org.webjars" % " mkdirp" % " 0.5.0"
1313 ),
14+ scriptedLaunchOpts := { scriptedLaunchOpts.value ++
15+ Seq (" -Dplugin.version=" + version.value)
16+ },
1417 publishArtifact in (Compile , packageDoc) := false ,
1518 publishArtifact in (Compile , packageSrc) := false ,
1619 bintrayRepository := " sbt-plugin-releases" ,
Original file line number Diff line number Diff line change 1- sbt.version =0.13.15
1+ sbt.version =1.2.8
Original file line number Diff line number Diff line change 1- addSbtPlugin(" com.github.xenonabe" % " sbt-coffeescript2" % sys.props(" project.version" ))
1+ sys.props.get(" plugin.version" ) match {
2+ case Some (x) => addSbtPlugin(" com.github.xenonabe" % " sbt-coffeescript2" % x)
3+ case _ => sys.error(""" |The system property 'plugin.version' is not defined.
4+ |Specify this property using the scriptedLaunchOpts -D.""" .stripMargin)
5+ }
Original file line number Diff line number Diff line change 1+ import sbt .internal .inc .LoggedReporter
2+
13lazy val root = (project in file(" ." )).enablePlugins(SbtWeb )
24
35WebKeys .reporter := {
46 val logFile = target.value / " test-errors.log"
5- new LoggerReporter (- 1 , new Logger {
7+ new LoggedReporter (- 1 , new Logger {
68
79 def trace (t : => Throwable ): Unit = {}
810
@@ -19,9 +21,7 @@ WebKeys.reporter := {
1921val checkTestErrorLogContents = taskKey[Unit ](" check that test log contents are correct" )
2022checkTestErrorLogContents := {
2123 val contents = IO .read(target.value / " test-errors.log" )
22- if (! contents.endsWith(""" /src/main/assets/a.coffee:0: unexpected %
23- |%
24- |^
24+ if (! contents.endsWith(""" /src/main/assets/a.coffee:0:0: unexpected %
2525 |one error found
2626 |""" .stripMargin)) {
2727 sys.error(s " Unexpected contents: $contents" )
Original file line number Diff line number Diff line change 1- sbt.version =0.13.15
1+ sbt.version =1.2.8
Original file line number Diff line number Diff line change 1- addSbtPlugin(" com.github.xenonabe" % " sbt-coffeescript2" % sys.props(" project.version" ))
1+ sys.props.get(" plugin.version" ) match {
2+ case Some (x) => addSbtPlugin(" com.github.xenonabe" % " sbt-coffeescript2" % x)
3+ case _ => sys.error(""" |The system property 'plugin.version' is not defined.
4+ |Specify this property using the scriptedLaunchOpts -D.""" .stripMargin)
5+ }
You can’t perform that action at this time.
0 commit comments