mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Handle absence of gpg better.
This commit is contained in:
parent
0867b102cc
commit
07ac15cc38
1 changed files with 6 additions and 6 deletions
|
@ -38,10 +38,8 @@ public class Gpg {
|
||||||
if (gpg != null) {
|
if (gpg != null) {
|
||||||
val directory = files.get(0).parentFile.absoluteFile
|
val directory = files.get(0).parentFile.absoluteFile
|
||||||
files.forEach { file ->
|
files.forEach { file ->
|
||||||
with(File(directory, file.absolutePath + ".asc")) {
|
val ascFile = File(directory, file.absolutePath + ".asc")
|
||||||
delete()
|
ascFile.delete()
|
||||||
result.add(this)
|
|
||||||
}
|
|
||||||
val allArgs = arrayListOf<String>()
|
val allArgs = arrayListOf<String>()
|
||||||
allArgs.add(gpg)
|
allArgs.add(gpg)
|
||||||
allArgs.add("-ab")
|
allArgs.add("-ab")
|
||||||
|
@ -60,11 +58,13 @@ public class Gpg {
|
||||||
error(line)
|
error(line)
|
||||||
line = br.readLine()
|
line = br.readLine()
|
||||||
}
|
}
|
||||||
throw KobaltException("Couldn't sign file $file")
|
warn("Couldn't sign file $file")
|
||||||
|
} else {
|
||||||
|
result.add(ascFile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return files.map { File(it.absolutePath + ".asc") }
|
return result
|
||||||
} else {
|
} else {
|
||||||
warn("Couldn't find the gpg command, make sure it is on your PATH")
|
warn("Couldn't find the gpg command, make sure it is on your PATH")
|
||||||
warn("Signing of artifacts with PGP (.asc) disabled")
|
warn("Signing of artifacts with PGP (.asc) disabled")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue