Added an install script#2
Conversation
|
I think this is a good start until we build up the stats to start to use brew. |
|
|
||
| This installs the binary to `~/.nb-cli/bin/nb`. Follow the instructions to add it to your PATH. | ||
|
|
||
| **Note**: Pre-built binaries are currently only available for macOS Apple Silicon (M1/M2/M3/M4). For other platforms, please use `cargo install` or build from source. |
There was a problem hiding this comment.
(Note to bring attention, not a request for change)
This is accurate for v0.0.1 but prep-release.yml also builds macOS arm64/amd64, Linux amd64/arm64, Windows. So we should update this after next release.
There was a problem hiding this comment.
Right, have to verify those actually work in the CI yet, will update README after that.
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Publish to crates.io | ||
| run: cargo publish |
There was a problem hiding this comment.
cargo publish with no CARGO_REGISTRY_TOKEN assumes trusted publishing is configured on crates.io for this repo. If not, this will fail. Worth double checking.
There was a problem hiding this comment.
Correct, I will turn it on once the release.yml is merged.
| URL="https://github.com/$REPO/releases/download/$VERSION/$BINARY" | ||
|
|
||
| # Installation directory (can be overridden with INSTALL_DIR env var) | ||
| INSTALL_DIR="${INSTALL_DIR:-$HOME/.nb-cli/bin}" |
There was a problem hiding this comment.
non-blocking: this usually goes to usr/bin/<tool-name> (or sometimes to usr/local/bin/<tool-name>).
There was a problem hiding this comment.
Yes, that makes sense, I am not aware of platform specific variations, so went with an independent path for the binary. We can explore using one of these if you are confident on the paths.
Adds an install script for users to install binaries directly from the release artifacts.
curl -fsSL https://raw.githubusercontent.com/jupyter-ai-contrib/nb-cli/main/install.sh | bashThis installs the binary to
~/.nb-cli/bin/nb. Follow the instructions to add it to your PATH.