Added gitRefreshIndex task.
This commit is contained in:
parent
e2357e9c2a
commit
1c13daeb6e
1 changed files with 6 additions and 0 deletions
|
@ -106,9 +106,15 @@ tasks {
|
||||||
mustRunAfter("clean")
|
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) {
|
val gitIsDirty by creating(Exec::class) {
|
||||||
description = "Fails if git has uncommitted changes."
|
description = "Fails if git has uncommitted changes."
|
||||||
group = "verification"
|
group = "verification"
|
||||||
|
dependsOn(gitRefreshIndex)
|
||||||
commandLine("git", "diff-index", "--quiet", "HEAD", "--")
|
commandLine("git", "diff-index", "--quiet", "HEAD", "--")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue