mirror of https://github.com/sbt/sbt.git
Check for git diff at Travis CI
This commit is contained in:
parent
9d87e6b3d4
commit
306db4d788
|
|
@ -16,7 +16,7 @@ matrix:
|
|||
|
||||
env:
|
||||
matrix:
|
||||
- SBT_CMD=";test:compile;scalariformCheck"
|
||||
- SBT_CMD=";test:compile;scalafmtCheck"
|
||||
- SBT_CMD="mimaReportBinaryIssues"
|
||||
- SBT_CMD="safeUnitTests"
|
||||
- SBT_CMD="otherUnitTests"
|
||||
|
|
|
|||
|
|
@ -361,6 +361,13 @@ def customCommands: Seq[Setting[_]] = Seq(
|
|||
otherUnitTests := {
|
||||
test.all(otherProjects).value
|
||||
},
|
||||
commands += Command.command("scalafmtCheck") { state =>
|
||||
sys.process.Process("git diff --name-only --exit-code").! match {
|
||||
case 0 => // ok
|
||||
case x => sys.error("git diff detected! Did you compile before committing?")
|
||||
}
|
||||
state
|
||||
},
|
||||
commands += Command.command("release-sbt-local") { state =>
|
||||
"clean" ::
|
||||
"so compile" ::
|
||||
|
|
|
|||
Loading…
Reference in New Issue