We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5929eb2 commit 612271bCopy full SHA for 612271b
cmd/goreleaser/internal/configure.go
@@ -385,6 +385,8 @@ type distribution struct {
385
sboms []config.SBOM
386
checksum config.Checksum
387
enableCgo bool
388
+ ldFlags string
389
+ goTags string
390
}
391
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
397
398
+ ldFlags := "-s -w"
399
+ if d.ldFlags != "" {
400
+ ldFlags = d.ldFlags
401
+ }
402
+
403
env := []string{
404
"COSIGN_YES=true",
- "LD_FLAGS=-s -w",
405
+ "LD_FLAGS=" + ldFlags,
406
"BUILD_FLAGS=-trimpath",
407
408
+ if d.goTags != "" {
409
+ env = append(env, "GO_TAGS="+d.goTags)
410
411
if !d.enableCgo {
412
env = append(env, "CGO_ENABLED=0")
413
0 commit comments