From 5343ebb978637631843dfc5c39996f6e728e234d Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Tue, 10 Oct 2023 17:56:40 -0700 Subject: [PATCH] Update install docs. --- website/docs/install.mdx | 68 ++++++++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 20 deletions(-) diff --git a/website/docs/install.mdx b/website/docs/install.mdx index ead8b814672..d3bf821c294 100644 --- a/website/docs/install.mdx +++ b/website/docs/install.mdx @@ -19,6 +19,30 @@ The entirety of moon is packaged and shipped as a single binary. It works on all systems, and does not require any external dependencies. For convenience, we provide the following scripts to download and install moon. +### proto + +moon can be installed and managed in [proto's toolchain](/proto) using a TOML plugin. This will +install moon to `~/.proto/tools/moon` and make the binary available at `~/.proto/bin`. + +```shell +proto add-plugin moon "source:https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml" +proto install moon +``` + +Furthermore, the version of moon can be pinned on a per-project basis using the `.prototools` file. + +```toml title=".prototools" +moon = "1.3.0" +``` + +:::info + +We suggest using proto to manage moon (and other tools), as it allows for multiple versions to be +installed and used. The other installation options only allow for a single version (typically the +latest). + +::: + ### Linux, macOS, WSL In a terminal that supports Bash, run: @@ -27,8 +51,8 @@ In a terminal that supports Bash, run: curl -fsSL https://moonrepo.dev/install/moon.sh | bash ``` -This will install moon to `~/.moon/bin` and create a symlink in `/usr/local/bin`. If the symlink -fails, you'll need to set the `PATH` manually in your shell. +This will install moon to `~/.moon/bin`. You'll then need to set `PATH` manually in your shell +profile. ```shell export PATH="$HOME/.moon/bin:$PATH" @@ -45,22 +69,6 @@ irm https://moonrepo.dev/install/moon.ps1 | iex This will install moon to `~\.moon\bin` and prepend to the `PATH` environment variable for the current session. To persist across sessions, update `PATH` manually. -### proto - -moon can be installed and managed in [proto's toolchain](/proto) using a TOML plugin. This will -install moon to `~/.proto/tools/moon` and make the binary available at `~/.proto/bin`. - -```shell -proto add-plugin moon "source:https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml" -proto install moon -``` - -Furthermore, the version of moon can be pinned on a per-project basis using the `.prototools` file. - -```toml title=".prototools" -moon = "1.3.0" -``` - ### Node.js moon is also packaged and shipped as a single binary through the @@ -78,8 +86,14 @@ rename the file after downloading, and apply the executable bit (`chmod +x`) on ## Upgrading -moon can be upgraded with the [`moon upgrade`](./commands/upgrade) command. However, this will only -upgrade moon if it was installed in `~/.moon/bin`. +If using proto, moon can be upgraded using the following command: + +```shell +proto install moon --pin +``` + +Otherwise, moon can be upgraded with the [`moon upgrade`](./commands/upgrade) command. However, this +will only upgrade moon if it was installed in `~/.moon/bin`. ```shell moon upgrade @@ -88,6 +102,20 @@ moon upgrade Otherwise, you can re-run the installers above and it will download, install, and overwrite with the latest version. +## Nightly releases + +moon supports nightly releases, which are built and published once a day, and for each merged +feature to our develop branches. When using a nightly release, you'll need to download and execute +the binaries manually. + +Nightlies are published to the following channels: + +- To our npm package + [`@moonrepo/cli`](https://www.npmjs.com/package/@moonrepo/cli?activeTab=versions) under the + `nightly` tag. Releases are versioned by date. +- As a [GitHub prerelease](https://github.com/moonrepo/moon/releases/tag/nightly) using the + `nightly` tag. This tag always represents the latest release, and is not historical. + ## Next steps