Fix #129: Add one-command cross-platform installers - #131
Conversation
|
Warning Review limit reached
Next review available in: 46 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds POSIX and PowerShell installers for verified YiiPress binaries. Updates documentation to use the globally installed ChangesInstaller distribution
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Developer
participant Installer
participant ReleaseArtifacts
participant InstallDirectory
Developer->>Installer: Run platform installer
Installer->>ReleaseArtifacts: Download archive and checksum manifest
Installer->>Installer: Verify checksum and expected executable
Installer->>InstallDirectory: Atomically replace installed binary
Installer-->>Developer: Report installed command and PATH status
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
731397c to
a39a811
Compare
There was a problem hiding this comment.
Pull request overview
Adds a checksum-verified, one-command Linux (amd64) installer (install.sh) intended to install/update yiipress globally, and updates top-level/docs guidance plus a PHPUnit test to validate the installer behavior.
Changes:
- Introduce
install.shthat downloads a release asset +SHA256SUMS, verifies the checksum, and atomically replaces an existing binary in the install dir (withsudoescalation when needed). - Update README and docs to surface the Linux installer command early and adjust installation guidance accordingly.
- Add a PHPUnit installer test and mark the roadmap item as completed.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
install.sh |
New Linux installer script with checksum verification and atomic install/update behavior. |
tests/Unit/Packaging/InstallerTest.php |
New integration-style unit test exercising installer happy path + checksum failure path. |
README.md |
Adds “Install or update on Linux” section and shifts examples toward global yiipress usage. |
docs/README.md |
Mirrors README’s Linux installer instructions in docs landing page. |
docs/binaries-phar-docker.md |
Documents Linux installer behavior and env-var overrides for install dir/version. |
roadmap.md |
Checks off issue #129 as completed. |
.gitattributes |
Enforces LF line endings for .sh files. |
Suppressed comments (2)
README.md:59
- The README now assumes the binary is always on PATH (using
yiipress ...), but several docs pages still explicitly assume a project-local binary and use./yiipress(for exampledocs/commands.md). Adding a short note here about using./yiipresswhen the binary is in the project directory would prevent confusing, inconsistent onboarding instructions.
- For GitHub Actions: the YiiPress build action, which downloads the Linux binary automatically.
- For container workflows: Docker, using the published binary-only YiiPress image.
tests/Unit/Packaging/InstallerTest.php:140
- The proc_open pipes are read but never closed. Closing the pipe streams before proc_close avoids leaking file descriptors and is the recommended pattern for proc_open usage.
$archive = $this->root . '/release/' . $asset;
$pipes = [];
$process = proc_open(
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@install.ps1`:
- Line 57: Update the file replacement logic around [IO.File]::Move in the
installer to support Windows PowerShell 5.1: call the two-argument File.Move
overload when $Target is absent, and call File.Replace with a null backup path
when the target already exists. Preserve the existing source and destination
variables and replacement behavior.
In `@install.sh`:
- Around line 82-100: Update the extracted binary validation after the tar
command to require that ${work_dir}/yiipress is a regular file and not a
symbolic link, using a non-following symlink check alongside the existing file
check. Keep the existing error message and exit behavior, and only allow the
subsequent elevated install commands to run after this validation succeeds.
In `@README.md`:
- Around line 25-31: Replace the mutable master installer URLs in README.md
lines 25-31, docs/README.md lines 18-24, and docs/binaries-phar-docker.md lines
8-14 with the same immutable or signed bootstrap mechanism for both Unix and
Windows instructions, preserving consistent commands across all three pages.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 891715c4-a0a8-4d89-959d-14d4ad42b4e5
📒 Files selected for processing (9)
.gitattributesREADME.mddocs/README.mddocs/binaries-phar-docker.mddocs/quickstart.mdinstall.ps1install.shroadmap.mdtests/Unit/Packaging/InstallerTest.php
Summary
Closes #129.
Verification
make test CLI_ARGS=tests/Unit/Packaging/InstallerTest.php— 6 tests, 91 assertionsmake psalmsh -n install.shmacOS and Windows execution cannot be performed on this Linux host; their release asset selection, checksum, atomic replacement, and update contracts are covered by the installer tests.
Summary by CodeRabbit
New Features
Documentation
yiipresscommand.Tests