Skip to content

feat(install): add curl install script with docs and tests - #1246

Merged
skevetter merged 8 commits into
mainfrom
feat/install-script
Sep 20, 2026
Merged

skevetter merged 8 commits into
mainfrom
feat/install-script

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

What

Adds a POSIX sh install script so the Devsy CLI installs with one command:

curl -L https://devsy.sh/install.sh | sh

The script lives at sites/docs-devsy-sh/public/install.sh, so the docs site's Netlify static export serves it at https://devsy.sh/install.sh once deployed.

Behavior

  • Detects OS (linux/darwin) and architecture (amd64/arm64) from uname; fails clearly on anything else, pointing Windows users at the PowerShell instructions in the docs.
  • Downloads the matching devsy-<os>-<arch> binary from the latest GitHub release, or a pinned release with DEVSY_VERSION=v1.19.0.
  • Verifies the download's SHA-256 against the release's checksums.txt when one is published; skips with a note when it is not (current releases publish no checksums, matching the existing manual install commands).
  • Installs to /usr/local/bin (via sudo when needed), falling back to ~/.local/bin with a PATH warning when neither works; DEVSY_INSTALL_DIR overrides the location.
  • DEVSY_RELEASE_BASE_URL overrides the download base for mirrors and tests.
  • Functions-only body with main "$@" at the end, so a truncated curl | sh download cannot execute a partial script.

Docs

  • getting-started/install.mdx: the install script is now the first CLI option, with the DEVSY_VERSION / DEVSY_INSTALL_DIR knobs documented; Homebrew and per-platform manual commands kept.
  • getting-started/update.mdx: re-running the install script is the update path for script installs.

Testing

New hack/install_script Go test package runs the real script end to end against a fake release server:

  • latest and pinned-version downloads request the right devsy-<os>-<arch> asset and install it 0755
  • checksum verified when published, aborts on mismatch, skips cleanly when absent
  • missing asset fails with a clear error
  • platform mapping for linux/darwin x amd64/arm64, plus clear failures for Windows shells, unsupported OS, and unsupported arch (via a shimmed uname)
  • sh -n syntax check

Local verification: go test ./hack/install_script/ passes; shellcheck and shfmt -i 4 -ci (the repo's pre-commit settings) are clean; npm run build in sites/docs-devsy-sh succeeds and emits out/install.sh.

Notes

  • Published through the GitHub web editor (no authenticated git push route from the working environment), so the commits are GitHub-verified web commits.
  • Draft: CI needs to settle before review. Not merged, no release, no changes outside this branch.

Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d51de570-0959-479a-93d4-6df070bb3f81

📥 Commits

Reviewing files that changed from the base of the PR and between d12223d and d0ca94c.

📒 Files selected for processing (5)
  • hack/install_script/doc.go
  • hack/install_script/install_test.go
  • sites/docs-devsy-sh/content/docs/getting-started/install.mdx
  • sites/docs-devsy-sh/content/docs/getting-started/update.mdx
  • sites/docs-devsy-sh/public/install.sh

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Sep 19, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit d0ca94c
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6aaf0a8f2c006c000801049d

@netlify

netlify Bot commented Sep 19, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit d0ca94c
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6aaf0a8f968c990008ffe53a

Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
Signed-off-by: Samuel K <skevetter@pm.me>
@skevetter
skevetter marked this pull request as ready for review September 19, 2026 23:12
@mergify

mergify Bot commented Sep 19, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@skevetter
skevetter merged commit 27e93d8 into main Sep 20, 2026
86 checks passed
@skevetter
skevetter deleted the feat/install-script branch September 20, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant