Skip to content

feat(install): add curl | sh install script - #914

Merged
platinummonkey merged 4 commits into
mainfrom
feat/install-script
Oct 14, 2026
Merged

platinummonkey merged 4 commits into
mainfrom
feat/install-script

Conversation

@platinummonkey

@platinummonkey platinummonkey commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds a one-line installer, curl -fsSL https://raw.githubusercontent.com/DataDog/pup/main/install.sh | sh, that works on macOS, Linux, and Windows. On macOS it uses Homebrew when available and falls back to a direct download otherwise.

Changes

  • install.sh: new installer
    • macOS + brew on PATH → brew install datadog-labs/pack/pup (unless PUP_VERSION or PUP_INSTALL_DIR is set, which Homebrew can't honor)
    • Otherwise (Linux, macOS without brew, Windows via Git Bash/MSYS2/Cygwin): resolves the latest release from the /releases/latest redirect (no rate-limited API call), downloads pup_<ver>_<OS>_<arch>.{tar.gz,zip}, verifies its SHA-256 against pup_<ver>_checksums.txt (fails closed if the hash is missing or wrong), and installs to ~/.local/bin
    • Maps aarch64/arm64 and x86_64/amd64, detects Rosetta on Apple Silicon, and always uses the x86_64 zip on Windows (the only Windows build published)
    • Overrides: PUP_VERSION, PUP_INSTALL_DIR, PUP_NO_BREW=1
    • POSIX sh (no bashisms). Everything runs from main, so a truncated download runs nothing
  • .github/workflows/install-script.yml: runs only when the script or workflow changes
    • shellcheck (--shell=sh)
    • Direct install on ubuntu-latest, macos-latest, and windows-latest: piped latest install, pinned v1.27.0, and a nonexistent version that must fail
    • The Homebrew path on macOS, and that PUP_VERSION/PUP_INSTALL_DIR bypass it
  • README.md: new "Install Script" section

Testing

  • shellcheck --shell=sh passes
  • Installs succeed under posh, dash, busybox sh, bash (Linux arm64), and macOS /bin/sh
  • Linux arm64 (workspace): latest via pipe, pinned v1.26.0, 0.0.0 exits 1, truncated script runs nothing, and checksum mismatch / missing checksum both exit 1
  • macOS arm64: direct install under /bin/bash 3.2 with PUP_NO_BREW=1
  • Windows and the brew path are covered by the new CI jobs

🤖 Generated with Claude Code

platinummonkey and others added 2 commits October 14, 2026 16:24
Adds a one-line installer for pup that works on macOS, Linux, and
Windows (Git Bash/MSYS2/Cygwin).

- macOS with Homebrew: runs `brew install datadog-labs/pack/pup`
- Otherwise: resolves the latest release (or PUP_VERSION), downloads
  the matching archive, verifies its SHA-256 against the release
  checksums file, and installs to PUP_INSTALL_DIR (~/.local/bin)
- New Install Script workflow: shellcheck plus install tests on
  Linux x86_64/arm64, macOS, and Windows, the Homebrew path, and a
  nonexistent-version failure case
- README documents the installer and its environment variables

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run the installer with `curl ... | sh` instead of requiring bash.

- Drop `local` (not POSIX) and the bash shebang
- Call `main` without "$@", which posh rejects under `set -u`
- Shellcheck in sh mode; CI also installs under dash, posh, and busybox sh
- README shows `| sh`

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@platinummonkey platinummonkey changed the title feat(install): add curl | bash install script feat(install): add curl | sh install script Oct 14, 2026
Drop the dash/posh/busybox job and the ubuntu arm runner; keep
ubuntu-latest, macos-latest, windows-latest, and the Homebrew job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@platinummonkey
platinummonkey marked this pull request as ready for review October 14, 2026 17:40
@platinummonkey
platinummonkey requested a review from a team as a code owner October 14, 2026 17:40

@datadog-prod-us1-6 datadog-prod-us1-6 Bot 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.

Bits Code Review: FAIL

On macOS with Homebrew available, the installer silently ignores PUP_VERSION and PUP_INSTALL_DIR, so documented overrides can install the wrong version and location.

Open Bits AI session

🤖 Bits Code Review · Commit 42d53b1

Comment thread install.sh Outdated
On macOS with Homebrew, the installer took the brew path even when
PUP_VERSION or PUP_INSTALL_DIR was set, silently ignoring both. Route
explicitly customized installs through the direct download instead.

- Skip Homebrew when either override is set
- Document the behavior in the script header and README
- CI: assert overrides bypass Homebrew on macOS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@platinummonkey
platinummonkey merged commit 05ffe98 into main Oct 14, 2026
15 checks passed
@platinummonkey
platinummonkey deleted the feat/install-script branch October 14, 2026 18:21
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.

2 participants