-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 use scorecard as binary name for all release builds #4518
Conversation
Previously, the binary name included the build platform which complicated running Scorecard after extracting the tarball. As all binaries now share the same name, we need a unique folder for each binary, so also removes `no_unique_dist_dir`. ossf#4517 Signed-off-by: Spencer Schrock <[email protected]>
snapshot.name_template was deprecated. https://goreleaser.com/deprecations/#snapshotname_template Signed-off-by: Spencer Schrock <[email protected]>
Before:make build-releaser
• building binaries
• building binary=dist/scorecard-linux-amd64
• building binary=dist/scorecard-darwin-arm64
• building binary=dist/scorecard-linux-arm64
• building binary=dist/scorecard-windows-arm64.exe
• building binary=dist/scorecard-windows-amd64.exe
• building binary=dist/scorecard-darwin-amd64
• archives
• archiving name=dist/scorecard_SNAPSHOT-2d95671c_windows_amd64.tar.gz
• archiving name=dist/scorecard_SNAPSHOT-2d95671c_linux_arm64.tar.gz
• archiving name=dist/scorecard_SNAPSHOT-2d95671c_darwin_amd64.tar.gz
• archiving name=dist/scorecard_SNAPSHOT-2d95671c_windows_arm64.tar.gz
• archiving name=dist/scorecard_SNAPSHOT-2d95671c_linux_amd64.tar.gz
• archiving name=dist/scorecard_SNAPSHOT-2d95671c_darwin_arm64.tar.gz tar tvf dist/scorecard_SNAPSHOT-2d95671c_linux_arm64.tar.gz
-rw-r----- sschrock/primarygroup 11355 2024-09-20 11:00 LICENSE
-rw-r--r-- sschrock/primarygroup 44586 2025-02-03 10:14 README.md
-rwxr-xr-x sschrock/primarygroup 51642520 2025-02-10 14:47 scorecard-linux-arm64 After:make build-releaser
• building binaries
• building binary=dist/windows_windows_arm64_v8.0/scorecard.exe
• building binary=dist/windows_windows_amd64_v1/scorecard.exe
• building binary=dist/darwin_darwin_arm64_v8.0/scorecard
• building binary=dist/darwin_darwin_amd64_v1/scorecard
• building binary=dist/linux_linux_amd64_v1/scorecard
• building binary=dist/linux_linux_arm64_v8.0/scorecard
• archives
• archiving name=dist/scorecard_SNAPSHOT-9544995d_linux_arm64.tar.gz
• archiving name=dist/scorecard_SNAPSHOT-9544995d_darwin_amd64.tar.gz
• archiving name=dist/scorecard_SNAPSHOT-9544995d_linux_amd64.tar.gz
• archiving name=dist/scorecard_SNAPSHOT-9544995d_windows_amd64.tar.gz
• archiving name=dist/scorecard_SNAPSHOT-9544995d_darwin_arm64.tar.gz
• archiving name=dist/scorecard_SNAPSHOT-9544995d_windows_arm64.tar.gz tar tvf dist/scorecard_SNAPSHOT-9544995d_linux_arm64.tar.gz
-rw-r----- sschrock/primarygroup 11355 2024-09-20 11:00 LICENSE
-rw-r--r-- sschrock/primarygroup 44586 2025-02-03 10:14 README.md
-rwxr-xr-x sschrock/primarygroup 51642520 2025-02-11 10:05 scorecard |
@timothysparg if you want to take a look |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4518 +/- ##
==========================================
+ Coverage 66.80% 68.46% +1.65%
==========================================
Files 230 246 +16
Lines 16602 18444 +1842
==========================================
+ Hits 11091 12627 +1536
- Misses 4808 4991 +183
- Partials 703 826 +123 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just have a single build that combines all of the goos
and goarch
?
goreleaser is smart enough to be able to know that windows needs an exe, which as far as I can see would be the only difference between all of the builds.
see https://github.com/timothysparg/scorecard/blob/feat/universal-binary-name/.goreleaser.yml
(I was about to submit the exact same pr, but you were too fast 😁)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Submit anyway, happy to review + close this one when I get some time
What kind of change does this PR introduce?
release config
What is the current behavior?
each release has the platform in the binary name
scorecard_5.0.0_darwin_arm64
What is the new behavior (if this is a feature change)?**
Each scorecard binary is called
scorecard
orscorecard.exe
if WindowsWhich issue(s) this PR fixes
Fixes #4517
Special notes for your reviewer
Does this PR introduce a user-facing change?
For user-facing changes, please add a concise, human-readable release note to
the
release-note
(In particular, describe what changes users might need to make in their
application as a result of this pull request.)