chore(bootstrap): retire duplicate setup scripts, delegate to resq-software/dev - #19
Conversation
…ftware/dev Replace bootstrap.sh with a ~9-line thin wrapper that curl-pipes the canonical dev/install.sh with REPO=programs. Delete the per-repo scripts/setup.sh and scripts/lib/shell-utils.sh drifted copies. Single source of truth lives in resq-software/dev — no more per-repo drift, and CI surface shrinks by one directory.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 50 minutes and 7 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Code Review
This pull request refactors the project's onboarding process by replacing local setup scripts with a remote installer. Specifically, it updates the README, modifies bootstrap.sh to delegate to a central repository, and removes the now-redundant setup.sh and shell-utils.sh files. Feedback was provided to address regressions in bootstrap.sh, including the loss of argument forwarding, hardcoded environment variables that prevent user overrides, and potential silent failures during the remote script download.
| export REPO=programs | ||
| exec sh -c "$(curl -fsSL https://raw.githubusercontent.com/resq-software/dev/main/install.sh)" |
There was a problem hiding this comment.
The current implementation has two functional issues and a reliability concern:
- Environment Variable Override: Hardcoding
export REPO=programsprevents users from specifying a different repository name via the environment, which contradicts the test plan mentioned in the PR description (REPO=<name> YES=1 sh bootstrap.sh). - Missing Argument Forwarding: Command-line arguments (e.g.,
--yes,--skip-keygen) are not passed to the delegated installer. This is a regression from the previous version which used"$@"to support unattended setups. - Error Handling: In many
shimplementations (such asdash),set -edoes not catch failures in command substitution when used as a direct argument to a command. Ifcurlfails (e.g., due to a 404 or network issue), the script may silently continue and execute an empty string viash -c.
Consider capturing the installer script into a variable first to ensure the download succeeded before execution, and use a default assignment for REPO to maintain flexibility.
| export REPO=programs | |
| exec sh -c "$(curl -fsSL https://raw.githubusercontent.com/resq-software/dev/main/install.sh)" | |
| export REPO="${REPO:-programs}" | |
| INSTALLER=$(curl -fsSL https://raw.githubusercontent.com/resq-software/dev/main/install.sh) || exit 1 | |
| exec sh -c "$INSTALLER" sh "$@" |
Summary
Retires the per-repo duplicated onboarding logic (
bootstrap.sh+scripts/setup.sh+scripts/lib/shell-utils.sh) and replacesbootstrap.shwith a ~9-line thin wrapper that delegates to the canonicalresq-software/devinstaller viaREPO=<name>.resq-software/dev../bootstrap.shstill works.Test plan
shellcheck bootstrap.shexits 0REPO=<name> YES=1 sh bootstrap.sh(in a throwaway dir) completes and prints the dev install "Ready!" banner🤖 Generated with Claude Code