Skip to content

feat(install): install the shell on macOS and Linux with one command - #59

Merged
kanushka merged 4 commits into
feat/release-artifacts-issue-53from
feat/install-unix-issue-54
Aug 11, 2026
Merged

feat(install): install the shell on macOS and Linux with one command#59
kanushka merged 4 commits into
feat/release-artifacts-issue-53from
feat/install-unix-issue-54

Conversation

@kanushka

Copy link
Copy Markdown
Contributor

Closes #54. Stacked on #58 — review that first; this PR's base retargets to main once it merges.

Adds scripts/install.sh and drives it from the acceptance suite exactly as a user does: the real script, against a fixture release served over HTTP, with the home directory and state root redirected to temporary directories. 13 tests cover clean install, idempotence, checksum refusal, pinned versions, the prerelease channel, the profile opt-out, an undetectable profile, an unsupported architecture, and the state root variable.

Also verified end to end against real GoReleaser output from #53, served locally: downloaded, checksum verified, and the installed Go binary runs.

Review caught three defects worth naming, all now fixed and covered by tests: the checksum lookup matched the filename as a substring, so a .sig line listed first would hand over the wrong digest and refuse a valid release; the INT/TERM trap cleaned up but did not exit, so Ctrl-C let the run continue and exit 0; and under pipefail the "checksums.txt does not list this archive" refusal was dead code that aborted with a bare exit 1 instead.

@kanushka
kanushka requested a review from hevayo as a code owner August 10, 2026 18:07
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e14abce6-973e-41ad-a28a-83b4b07a67a8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a production scripts/install.sh installer for macOS/Linux (incl. WSL) and a new Unix-only acceptance test suite that exercises the installer exactly as an end user would (real script, HTTP-served fixture release assets, isolated HOME/state root).

Changes:

  • Introduces scripts/install.sh that resolves a release (stable/prerelease/pinned), downloads and verifies an archive against checksums.txt, installs wso2 into $WSO2_HOME/bin, and wires PATH via a delimited profile block (or prints manual instructions).
  • Adds test/acceptance/install_unix_test.go with an HTTP fixture release server and tests covering clean install, idempotence, checksum failures, prerelease/pinned resolution, profile opt-out, undetectable profile, unsupported arch, and WSO2_HOME behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
test/acceptance/install_unix_test.go Adds acceptance coverage that runs the real installer against a local fixture release server under isolated HOME/state root.
scripts/install.sh Adds the end-user installer script with release resolution, checksum verification, extraction, install, and PATH/profile wiring.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/install.sh
Comment thread scripts/install.sh
Comment thread scripts/install.sh
@kanushka
kanushka merged commit a10f335 into feat/release-artifacts-issue-53 Aug 11, 2026
4 checks passed
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