polywrap / wrap-cli

Used to create, build, and integrate wraps.
https://polywrap.io
MIT License
170 stars 52 forks source link

Install script for CLI package #1889

Closed krisbitney closed 1 year ago

krisbitney commented 1 year ago

This PR adds an install script for the CLI package (standalone executable).

The script is adapted from https://github.com/teaxyz/setup/blob/main/install.sh. I gave credit at the top of the install script.

Usage instructions:

$ sh <(curl https://raw.githubusercontent.com/polywrap/cli/origin-dev/install.sh)

# Installs to `~/.polywrap`
# If polywrap is already installed, the script instead checks for updates

The script should work on MacOS, Linux, and WSL. I would appreciate if reviewers test it in their environments, especially if you have access to WSL. Native Windows support is not yet available for the installation script, so Windows users without WSL must download the executable and add it to their PATH manually.

This script cannot be properly tested until the next CLI GitHub release, which will include the first release of the standalone executables. I have tested the script using a test URL pointing to the NodeJS CLI binary and everything is working correclty in my environment (macos-arm64).

krisbitney commented 1 year ago

this looks awesome :) thanks for pushing this. quick q: in order for me to test things locally we must do a release of the CLI; which will add the binaries into the release (as assets) and then I can just run the installation script locally; right?

yes, exactly