feat(installer): thin curl|bash shim over canonical CLI#2
Merged
Conversation
Adds setup-rebar.sh as a one-line installer that clones rebar to ~/.rebar (configurable via REBAR_DIR / --dir), runs bin/install for canonical PATH and completion wiring, and exits pointing at `rebar new` / `rebar adopt` for actual project bootstrap. Deliberately a shim, not a parallel codepath: project creation stays in the Go CLI so this can't drift from `rebar new`, `rebar adopt`, `bin/install`, or `ask init`. Inspired by #1 (ttschampel) — keeps the curl|bash UX, drops the 462-line reimplementation of project bootstrap.
8 tasks
Owner
Author
|
@ttschampel — flagged this for you in #1. Would love your review since this is the cleaner version of what you originally proposed. Specifically curious whether anything felt obvious in your version that I shouldn't have dropped. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
setup-rebar.sh— a ~120-line one-line installer that clones rebar to~/.rebar, runs the canonicalbin/installfor PATH/completion wiring, and exits pointing atrebar new/rebar adopt.Deliberately a shim, not a parallel bootstrap codepath. Project creation stays in the Go CLI so this can't drift from
rebar new,rebar adopt,bin/install, orask init.Background
Inspired by #1 (@ttschampel). That PR is the right signal —
curl | bashis a real UX gap — but the implementation re-implementedrebar newin 462 lines of bash with several footguns (auto-Homebrew/bash5 + sudo, splatting bootstrap into\$PWD, blindgit pull, never callingask initorrebar init). Rather than merge-then-rewrite, landing the cleaner shim here onv3.0.0-alphafor review.What it does
\$REBAR_DIR(default~/.rebar)bin/installfor PATH/completions/ASK_SERVERrebar new <name>orrebar adoptThat's it. No template copying, no auto-installing system deps, no project bootstrap — those live in the Go CLI where they belong.
Test Plan
bash -n setup-rebar.sh— syntax clean./setup-rebar.sh --help— usage prints correctlycurl | bashfrom this branch →rebar newworks--server HOST:PORTpassthrough writesASK_SERVERto RC~/.rebarcheckout: dirty-check gates the fetchNotes
v3.0.0-alphafor now. When alpha lands onmain, that pointer flips tomain(or to a release tag) — that's the worked-example backport.