File tree Expand file tree Collapse file tree 6 files changed +17
-12
lines changed Expand file tree Collapse file tree 6 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,7 @@ type distribution struct {
384
384
dockerSigns []config.Sign
385
385
sboms []config.SBOM
386
386
checksum config.Checksum
387
+ enableCgo bool
387
388
}
388
389
389
390
func (d * distribution ) BuildProject () config.Project {
@@ -392,18 +393,22 @@ func (d *distribution) BuildProject() config.Project {
392
393
builds = append (builds , buildConfig .Build (d .name ))
393
394
}
394
395
396
+ env := []string {
397
+ "COSIGN_YES=true" ,
398
+ "LD_FLAGS=-s -w" ,
399
+ "BUILD_FLAGS=-trimpath" ,
400
+ }
401
+ if ! d .enableCgo {
402
+ env = append (env , "CGO_ENABLED=0" )
403
+ }
404
+
395
405
return config.Project {
396
406
ProjectName : "opentelemetry-collector-releases" ,
397
407
Release : config.Release {
398
408
ReplaceExistingArtifacts : true ,
399
409
},
400
- Checksum : d .checksum ,
401
- Env : []string {
402
- "COSIGN_YES=true" ,
403
- "LD_FLAGS=-s -w" ,
404
- "CGO_ENABLED=0" ,
405
- "BUILD_FLAGS=-trimpath" ,
406
- },
410
+ Checksum : d .checksum ,
411
+ Env : env ,
407
412
Builds : builds ,
408
413
Archives : d .archives ,
409
414
MSI : d .msiConfig ,
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ project_name: opentelemetry-collector-releases
3
3
env :
4
4
- COSIGN_YES=true
5
5
- LD_FLAGS=-s -w
6
- - CGO_ENABLED=0
7
6
- BUILD_FLAGS=-trimpath
7
+ - CGO_ENABLED=0
8
8
release :
9
9
replace_existing_artifacts : true
10
10
builds :
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ project_name: opentelemetry-collector-releases
3
3
env :
4
4
- COSIGN_YES=true
5
5
- LD_FLAGS=-s -w
6
- - CGO_ENABLED=0
7
6
- BUILD_FLAGS=-trimpath
7
+ - CGO_ENABLED=0
8
8
release :
9
9
replace_existing_artifacts : true
10
10
msi :
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ project_name: opentelemetry-collector-releases
3
3
env :
4
4
- COSIGN_YES=true
5
5
- LD_FLAGS=-s -w
6
- - CGO_ENABLED=0
7
6
- BUILD_FLAGS=-trimpath
7
+ - CGO_ENABLED=0
8
8
release :
9
9
replace_existing_artifacts : true
10
10
builds :
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ project_name: opentelemetry-collector-releases
3
3
env :
4
4
- COSIGN_YES=true
5
5
- LD_FLAGS=-s -w
6
- - CGO_ENABLED=0
7
6
- BUILD_FLAGS=-trimpath
7
+ - CGO_ENABLED=0
8
8
release :
9
9
replace_existing_artifacts : true
10
10
msi :
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ project_name: opentelemetry-collector-releases
3
3
env :
4
4
- COSIGN_YES=true
5
5
- LD_FLAGS=-s -w
6
- - CGO_ENABLED=0
7
6
- BUILD_FLAGS=-trimpath
7
+ - CGO_ENABLED=0
8
8
release :
9
9
replace_existing_artifacts : true
10
10
msi :
You can’t perform that action at this time.
0 commit comments