mirror of
https://github.com/smallstep/cli.git
synced 2025-04-19 10:42:15 +03:00
Use envOrDefault
for GPG_PRIVATE_KEY_FILE
environment variable
By using `envOrDefault` an issue is prevented in evaluating the template before a release is created. By setting the default value to `ENV_VAR_GPG_PRIVATE_KEY_FILE_NOT_SET`, this value is then shown in the error message at signing time. The reason for changing this is so that it becomes possible to create local, unsigned releases when creating a release as follows: `goreleaser release --snapshot --clean --skip sign,after`
This commit is contained in:
parent
5d86f91a2d
commit
c60d625eda
@ -133,10 +133,10 @@ nfpms:
|
||||
postremove: scripts/postremove.sh
|
||||
rpm:
|
||||
signature:
|
||||
key_file: "{{ .Env.GPG_PRIVATE_KEY_FILE }}"
|
||||
key_file: '{{ envOrDefault "GPG_PRIVATE_KEY_FILE" "ENV_VAR_GPG_PRIVATE_KEY_FILE_NOT_SET" }}'
|
||||
deb:
|
||||
signature:
|
||||
key_file: "{{ .Env.GPG_PRIVATE_KEY_FILE }}"
|
||||
key_file: '{{ envOrDefault "GPG_PRIVATE_KEY_FILE" "ENV_VAR_GPG_PRIVATE_KEY_FILE_NOT_SET" }}'
|
||||
type: origin
|
||||
-
|
||||
<< : *NFPM
|
||||
|
Loading…
x
Reference in New Issue
Block a user