mirror of
https://github.com/ko-build/ko.git
synced 2024-11-27 08:21:07 +02:00
don't fail if LDFLAGS env isn't set (#758)
This commit is contained in:
parent
9139f454d7
commit
59c4264234
5
.ko.yaml
5
.ko.yaml
@ -1,2 +1,7 @@
|
||||
baseImageOverrides:
|
||||
github.com/google/ko: golang:1.17
|
||||
|
||||
builds:
|
||||
- id: ko
|
||||
ldflags:
|
||||
- "{{ .Env.LDFLAGS }}"
|
||||
|
@ -638,7 +638,9 @@ func (g *gobuild) tarKoData(ref reference, platform *v1.Platform) (*bytes.Buffer
|
||||
}
|
||||
|
||||
func createTemplateData() map[string]interface{} {
|
||||
envVars := map[string]string{}
|
||||
envVars := map[string]string{
|
||||
"LDFLAGS": "",
|
||||
}
|
||||
for _, entry := range os.Environ() {
|
||||
kv := strings.SplitN(entry, "=", 2)
|
||||
envVars[kv[0]] = kv[1]
|
||||
|
Loading…
Reference in New Issue
Block a user