Skip to content

feat(install): install the shell on Windows with one command - #60

Merged
kanushka merged 3 commits into
feat/install-unix-issue-54from
feat/install-windows-issue-55
Aug 11, 2026
Merged

feat(install): install the shell on Windows with one command#60
kanushka merged 3 commits into
feat/install-unix-issue-54from
feat/install-windows-issue-55

Conversation

@kanushka

Copy link
Copy Markdown
Contributor

Closes #55. Stacked on #59.

Adds scripts/install.ps1 and a windows-latest CI job that drives it through the same scenarios the Unix runs cover. The fixture release moved into a shared file so both scripts are proven against one contract rather than two descriptions of it, and the archives now carry the real shell built with the version the tag names, so a test installs and then runs what it installed.

Two deliberate departures from the Choreo installer this design came from: architecture detection handles arm64 rather than only 64-bit versus 32-bit, and the mklink symlink step is gone — it raised a UAC prompt and passed too few arguments to create a working link. Nothing here needs administrator rights.

I could not run PowerShell locally, so unlike #58 and #59 this script is unverified except by cross-compiled go vet. The Windows CI job on this PR is the first real execution; I will watch it and fix what it finds.

@kanushka
kanushka requested a review from hevayo as a code owner August 10, 2026 18:19
@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: b4c73125-667c-43c6-b0fe-404c5fd32a76

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 first-class Windows “one-command” installer (scripts/install.ps1) and validates it in CI with a Windows acceptance job, aligning Windows behavior with the existing Unix installer contract and test scenarios.

Changes:

  • Added a PowerShell installer that downloads the correct release for the detected Windows architecture, verifies SHA-256 checksums, installs into the WSO2 state root, and updates the per-user Path.
  • Added Windows acceptance tests that exercise the installer against the shared fixture release (including idempotence and verification failures) while restoring per-user environment variables afterwards.
  • Refactored installer acceptance fixtures into a shared file so Unix and Windows runs are proven against the same artifact/tag/checksum contract.

Reviewed changes

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

Show a summary per file
File Description
scripts/install.ps1 New Windows installer implementation (download, verify, extract, install, and PATH wiring).
test/acceptance/install_windows_test.go Windows-only acceptance coverage for the installer, including user-environment assertions and cleanup.
test/acceptance/install_unix_test.go Adjusted Unix acceptance harness to use shared fixture infrastructure and platform-specific fields.
test/acceptance/install_fixture_test.go New shared fixture release server + archive builder used by both Unix and Windows installer tests.
.github/workflows/pr-checks.yml Added a windows-latest job to run the installer acceptance tests on a real Windows runner.
Suppressed comments (2)

scripts/install.ps1:131

  • -UseBasicParsing is not available in PowerShell 6+/7+, and the test harness prefers pwsh when present. This makes latest-version resolution fail on runners with PowerShell 7. Use a version-conditional splat so Windows PowerShell 5.1 can still request basic parsing.
    $url = "$(Get-ReleaseBaseUrl)/latest"
    try {
        $response = Invoke-WebRequest -Uri $url -UseBasicParsing
    } catch {
        Stop-WithError "could not reach $url to find the newest release: $($_.Exception.Message)"

scripts/install.ps1:269

  • -UseBasicParsing is not available in PowerShell 6+/7+, so the checksum download will fail under pwsh. Use a version-conditional splat to keep compatibility with Windows PowerShell 5.1 without breaking PowerShell 7.
        try {
            Invoke-WebRequest -Uri "$(Get-ReleaseBaseUrl)/download/$tag/checksums.txt" `
                -OutFile $checksumPath -UseBasicParsing
        } catch {
            Stop-WithError "could not download the checksum file for $tag, so the archive cannot be verified."
        }

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

Comment thread scripts/install.ps1
Comment thread scripts/install.ps1
…ssue-55

# Conflicts:
#	test/acceptance/install_unix_test.go
@kanushka
kanushka merged commit a10f335 into feat/release-artifacts-issue-53 Aug 11, 2026
5 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