build: gitleaks Linux arm64 arch selection in build-pr.ps1 - #288
Merged
Conversation
The non-Windows gitleaks install hard-coded linux_x64, so on ARM64 Linux (AWS Graviton, ARM CI runners) it fetched an incompatible binary. Compute BOTH os and arch from the running runtime: arch from OSArchitecture (arm64/x64), os from $IsMacOS (darwin/linux). Covers darwin_x64, darwin_arm64, linux_x64, linux_arm64. Verified: script parses clean and all four combos produce the right asset name. Closes #270
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #270. The non-Windows gitleaks install in
scripts/build-pr.ps1hard-codedlinux_x64; #269 added the macOS arch branch but left the Linux path x64-only, so ARM64 Linux (Graviton / ARM CI runners) installs an incompatible binary.Refactor to compute both OS and arch from the runtime:
Covers all four assets:
darwin_x64,darwin_arm64,linux_x64,linux_arm64. Script parses clean; all four combos verified to produce the correct asset name.build-pr.ps1is not a protected file, so normal CI (no bypass). Canonical file — worth feeding back to repo-template as a follow-up.