mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Add batch flag for publish commands
This commit is contained in:
@@ -18,6 +18,7 @@ type Signer interface {
|
||||
SetKey(keyRef string)
|
||||
SetKeyRing(keyring, secretKeyring string)
|
||||
SetPassphrase(passphrase, passphraseFile string)
|
||||
SetBatch(batch bool)
|
||||
DetachedSign(source string, destination string) error
|
||||
ClearSign(source string, destination string) error
|
||||
}
|
||||
@@ -42,6 +43,11 @@ type GpgSigner struct {
|
||||
keyRef string
|
||||
keyring, secretKeyring string
|
||||
passphrase, passphraseFile string
|
||||
batch bool
|
||||
}
|
||||
|
||||
func (g *GpgSigner) SetBatch(batch bool) {
|
||||
g.batch = batch
|
||||
}
|
||||
|
||||
// SetKey sets key ID to use when signing files
|
||||
@@ -79,6 +85,9 @@ func (g *GpgSigner) gpgArgs() []string {
|
||||
if g.passphraseFile != "" {
|
||||
args = append(args, "--passphrase-file", g.passphraseFile)
|
||||
}
|
||||
if g.batch {
|
||||
args = append(args, "--no-tty")
|
||||
}
|
||||
|
||||
return args
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user