Added gitRefreshIndex task.

This commit is contained in:
Erik C. Thauvin 2018-06-25 17:12:05 -07:00
parent e2357e9c2a
commit 1c13daeb6e

View file

@ -106,9 +106,15 @@ tasks {
mustRunAfter("clean")
}
val gitRefreshIndex by creating(Exec::class) {
description = "Refreshes the git index."
commandLine("git", "update-index", "--refresh").isIgnoreExitValue = true
}
val gitIsDirty by creating(Exec::class) {
description = "Fails if git has uncommitted changes."
group = "verification"
dependsOn(gitRefreshIndex)
commandLine("git", "diff-index", "--quiet", "HEAD", "--")
}