mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 16:07: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) {
|
||||
val directory = files.get(0).parentFile.absoluteFile
|
||||
files.forEach { file ->
|
||||
with(File(directory, file.absolutePath + ".asc")) {
|
||||
delete()
|
||||
result.add(this)
|
||||
}
|
||||
val ascFile = File(directory, file.absolutePath + ".asc")
|
||||
ascFile.delete()
|
||||
val allArgs = arrayListOf<String>()
|
||||
allArgs.add(gpg)
|
||||
allArgs.add("-ab")
|
||||
|
@ -60,11 +58,13 @@ public class Gpg {
|
|||
error(line)
|
||||
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 {
|
||||
warn("Couldn't find the gpg command, make sure it is on your PATH")
|
||||
warn("Signing of artifacts with PGP (.asc) disabled")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue