File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -385,6 +385,8 @@ type distribution struct {
385
385
sboms []config.SBOM
386
386
checksum config.Checksum
387
387
enableCgo bool
388
+ ldFlags string
389
+ goTags string
388
390
}
389
391
390
392
func (d * distribution ) BuildProject () config.Project {
@@ -393,11 +395,19 @@ func (d *distribution) BuildProject() config.Project {
393
395
builds = append (builds , buildConfig .Build (d .name ))
394
396
}
395
397
398
+ ldFlags := "-s -w"
399
+ if d .ldFlags != "" {
400
+ ldFlags = d .ldFlags
401
+ }
402
+
396
403
env := []string {
397
404
"COSIGN_YES=true" ,
398
- "LD_FLAGS=-s -w" ,
405
+ "LD_FLAGS=" + ldFlags ,
399
406
"BUILD_FLAGS=-trimpath" ,
400
407
}
408
+ if d .goTags != "" {
409
+ env = append (env , "GO_TAGS=" + d .goTags )
410
+ }
401
411
if ! d .enableCgo {
402
412
env = append (env , "CGO_ENABLED=0" )
403
413
}
You can’t perform that action at this time.
0 commit comments