Skip to content

Commit 6fc296e

Browse files
authored
🌱 remove OS and Arch info from scorecard release binary name (#4520)
* feat: create binary without OS and arch in name Previously binaries were created with their architecture and OS included as part of their binary name. Removing the `binary: scorecard-<linux|darwin|windows>-{{ .Arch }}` line allows us to collapse all of the different build configs into a single universal build that caters for [linux,darwin,windos]*[arm64,amd64] `- -buildmode=exe` was not needed on the windows builds and was also removed. closes #4517 Signed-off-by: Tim Sparg <[email protected]> * fix: resolve name_template deprecation As per https://goreleaser.com/deprecations#snapshotname_template `snapshot.name_template` has been replaced with `snapshot.version_template` Signed-off-by: Tim Sparg <[email protected]> --------- Signed-off-by: Tim Sparg <[email protected]>
1 parent 2d95671 commit 6fc296e

File tree

2 files changed

+4
-54
lines changed

2 files changed

+4
-54
lines changed

.goreleaser.yml

+2-53
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ before:
1010
gomod:
1111
proxy: true
1212
builds:
13-
- id: linux
14-
binary: scorecard-linux-{{ .Arch }}
15-
no_unique_dist_dir: true
13+
- id: universal
1614
flags:
1715
# trimpath is for reproducible builds
1816
# remove all file system paths from the resulting executable.
@@ -29,61 +27,12 @@ builds:
2927
mod_timestamp: '{{ .CommitTimestamp }}'
3028
goos:
3129
- linux
32-
goarch:
33-
- amd64
34-
- arm64
35-
ldflags:
36-
- -s {{.Env.VERSION_LDFLAGS}}
37-
38-
- id: darwin
39-
binary: scorecard-darwin-{{ .Arch }}
40-
no_unique_dist_dir: true
41-
flags:
42-
# trimpath is for reproducible builds
43-
# remove all file system paths from the resulting executable.
44-
# Instead of absolute file system paths, the recorded file names
45-
# will begin with either "go" (for the standard library),
46-
# or a module path@version (when using modules),
47-
# or a plain import path (when using GOPATH).
48-
- -trimpath
49-
- -tags=netgo
50-
# Set the modified timestamp on the output binary, typically
51-
# you would do this to ensure a build was reproducible. Pass
52-
# empty string to skip modifying the output.
53-
# Default is empty string.
54-
mod_timestamp: '{{ .CommitTimestamp }}'
55-
goos:
5630
- darwin
57-
goarch:
58-
- amd64
59-
- arm64
60-
ldflags:
61-
- -s {{.Env.VERSION_LDFLAGS}}
62-
63-
- id: windows
64-
binary: scorecard-windows-{{ .Arch }}
65-
no_unique_dist_dir: true
66-
flags:
67-
# trimpath is for reproducible builds
68-
# remove all file system paths from the resulting executable.
69-
# Instead of absolute file system paths, the recorded file names
70-
# will begin with either "go" (for the standard library),
71-
# or a module path@version (when using modules),
72-
# or a plain import path (when using GOPATH).
73-
- -trimpath
74-
- -tags=netgo
75-
# Set the modified timestamp on the output binary, typically
76-
# you would do this to ensure a build was reproducible. Pass
77-
# empty string to skip modifying the output.
78-
# Default is empty string.
79-
mod_timestamp: '{{ .CommitTimestamp }}'
80-
goos:
8131
- windows
8232
goarch:
8333
- amd64
8434
- arm64
8535
ldflags:
86-
- -buildmode=exe
8736
- -s {{.Env.VERSION_LDFLAGS}}
8837

8938
checksum:
@@ -93,7 +42,7 @@ checksum:
9342
name_template: "{{ .ProjectName }}_checksums.txt"
9443

9544
snapshot:
96-
name_template: SNAPSHOT-{{ .ShortCommit }}
45+
version_template: SNAPSHOT-{{ .ShortCommit }}
9746
changelog:
9847
# Set it to true if you wish to skip the changelog generation.
9948
# This may result in an empty release notes on GitHub/GitLab/Gitea.

tools/go.mod

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module github.com/ossf/scorecard/tools
22

3-
go 1.23.0
3+
go 1.23.4
4+
45
toolchain go1.23.6
56

67
require (

0 commit comments

Comments
 (0)