Skip to content

build: gitleaks Linux arm64 arch selection in build-pr.ps1 - #288

Merged
Chris-Wolfgang merged 1 commit into
mainfrom
fix/270-gitleaks-linux-arm64
Jul 21, 2026
Merged

build: gitleaks Linux arm64 arch selection in build-pr.ps1#288
Chris-Wolfgang merged 1 commit into
mainfrom
fix/270-gitleaks-linux-arm64

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Fixes #270. The non-Windows gitleaks install in scripts/build-pr.ps1 hard-coded linux_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:

$arch = if ([RuntimeInformation]::OSArchitecture -eq 'Arm64') { 'arm64' } else { 'x64' }
$os   = if ($IsMacOS) { 'darwin' } else { 'linux' }
$archive = "gitleaks_${version}_${os}_${arch}.tar.gz"

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.ps1 is not a protected file, so normal CI (no bypass). Canonical file — worth feeding back to repo-template as a follow-up.

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
Copilot AI review requested due to automatic review settings July 21, 2026 02:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Chris-Wolfgang
Chris-Wolfgang merged commit 070613d into main Jul 21, 2026
11 checks passed
@Chris-Wolfgang
Chris-Wolfgang deleted the fix/270-gitleaks-linux-arm64 branch July 21, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build-pr.ps1: select gitleaks arch for Linux arm64 (canonical portability parity)

2 participants