Now using git diff for gitIsDirty task.
This commit is contained in:
parent
856a3688c0
commit
e3dc6af9b1
3 changed files with 2 additions and 9 deletions
|
@ -9,7 +9,6 @@ import java.io.FileInputStream
|
|||
import java.net.URL
|
||||
import java.util.Properties
|
||||
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "1.2.50"
|
||||
`build-scan`
|
||||
|
@ -113,16 +112,10 @@ 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", "--")
|
||||
commandLine("git", "diff", "--quiet", "--exit-code")
|
||||
}
|
||||
|
||||
val gitTag by creating(Exec::class) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue