scripts/helm-docs.sh: detect CPU architecture on every OS - #952
Merged
Merged
Conversation
The script hardcoded x86_64 on macOS, so Apple Silicon machines downloaded an amd64 binary that fails with "Bad CPU type in executable". On Linux the amd64 branch pointed at a release asset that does not exist, and arm64 hosts report aarch64, which the script never matched. Map uname -m to the helm-docs release asset names for all supported OSes. Amp-Thread-ID: https://ampcode.com/threads/T-01a0e96e-01bb-762e-a752-d2a3103593f0 Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
enabled auto-merge (squash)
September 29, 2026 22:07
devdinu
approved these changes
Sep 29, 2026
marcleblanc2
added a commit
that referenced
this pull request
Sep 30, 2026
Bumps the pinned helm-docs in `scripts/helm-docs.sh` from 1.7.0 (Feb 2022) to 1.14.2, the [latest release](https://github.com/norwoodj/helm-docs/releases/tag/v1.14.2) (Jul 2024). Follows #952. ## Test plan - Apple Silicon: `rm -rf target && ./scripts/helm-docs.sh` downloads `Mach-O 64-bit executable arm64`, `target/bin/helm-docs-1.14.2 --version` prints `helm-docs version 1.14.2` - After committing the regenerated READMEs, `./scripts/helm-docs.sh && [[ -z $(git status -s) ]]` (the `AGENTS.md` check) passes Co-authored-by: Amp <amp@ampcode.com>
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.
scripts/helm-docs.shhardcodedarch=x86_64on macOS, so on Apple Silicon it downloads an amd64 binary and fails:Two more latent bugs in the same block: the Linux
amd64branch pointed athelm-docs_1.7.0_linux_amd64.tar.gz, which is not a published asset (they arex86_64), and Linux arm64 hosts reportaarch64fromuname -m, which thearm)branch never matched.This replaces the per-OS blocks with one
uname -scase for the OS and oneuname -mcase for the architecture, mapped to the release asset names (Darwin_arm64,Linux_x86_64, ...). Unsupported combinations exit 126 with the offending value instead of a generic message. The pinned version stays at 1.7.0 so generated READMEs do not churn.Test plan
rm -rf target && ./scripts/helm-docs.shdownloadsMach-O 64-bit executable arm64and regenerates all four chart READMEs with no diff (theAGENTS.mdcheck).curl -IconfirmsDarwin_x86_64,Darwin_arm64,Linux_x86_64,Linux_arm64assets exist for v1.7.0 andlinux_amd64returns 404.