diff --git a/.github/workflows/install_snippet.sh b/.github/workflows/install_snippet.sh index 5fe727f0f..e1a3b69d2 100755 --- a/.github/workflows/install_snippet.sh +++ b/.github/workflows/install_snippet.sh @@ -13,13 +13,17 @@ See full install instructions in [README.md](https://github.com/aspect-build/asp ### Bazelisk (MacOS / Linux) -Configure [bazelisk](https://github.com/bazelbuild/bazelisk) to use the Aspect CLI OSS for all developers. Add this to \`.bazeliskrc\` in your project folder: +Configure [bazelisk](https://github.com/bazelbuild/bazelisk) to use the Aspect CLI OSS for all developers in a repository +by adding the following to \`.bazeliskrc\` in the repository root: \`\`\` BAZELISK_BASE_URL=https://github.com/aspect-build/aspect-cli/releases/download USE_BAZEL_VERSION=aspect/${TAG} \`\`\` +> [!NOTE] +> This approach doesn't provide the \`aspect init\` command, which has to run outside a Bazel workspace. + The underlying version of Bazel can be configured in your \`.bazelversion\` file or the \`BAZEL_VERSION\` environment variable. EOF diff --git a/README.md b/README.md index 3a5eac9d2..38d725e7c 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,15 @@ We intend for Aspect CLI to remain free for individuals (only for personal use), ### Bazelisk (MacOS / Linux) -Aspect CLI OSS can also be installed in an existing Bazel workspace using [bazelisk]. +Aspect CLI OSS can be installed in an existing Bazel workspace using [bazelisk]. + +> [!NOTE] +> This approach doesn't provide the `aspect init` command, which has to run outside a Bazel workspace. From the [OSS releases page](https://github.com/aspect-build/aspect-cli/releases), copy the `.bazeliskrc` snippet into your `.bazeliskrc` file to install Aspect for all developers in the target repository. -Note that in all cases, the `.bazelversion` file continues to indicate which version of the -Bazel tool is fetched and run beneath the wrapper. +The underlying version of Bazel can be configured in your `.bazelversion` file or the `BAZEL_VERSION` environment variable. ### Manual (MacOS / Linux) @@ -65,17 +67,26 @@ This installs the `aspect` command and also links it to `bazel`, just like the [ ### Bazelisk (MacOS / Linux) -In an already-existing Bazel workspace, you can have [bazelisk] -install the Aspect CLI just like it can install the Bazel CLI. +Aspect CLI can be installed in an existing Bazel workspace using [bazelisk]. > [!NOTE] > This approach doesn't provide the `aspect init` command, which has to run outside a Bazel workspace. -From the [releases page](https://docs.aspect.build/cli/releases), -copy the `.bazeliskrc` snippet into your `.bazeliskrc` file to install Aspect for all developers in this repository. +Configure [bazelisk](https://github.com/bazelbuild/bazelisk) to use the Aspect CLI for all developers in a repository +by adding the following to \`.bazeliskrc\` in the repository root: + +\`\`\` +BAZELISK_BASE_URL=https://static.aspect.build/aspect +USE_BAZEL_VERSION=aspect/xxxx.xx.xx +\`\`\` + +Check the Aspect CLI [Homebrew formula](https://github.com/aspect-build/homebrew-aspect/blob/main/Formula/aspect.rb) for +latest version of Aspect CLI. + +> [!NOTE] +> An Aspect CLI releases page with release notes and past releases is coming soon. -Note that in all cases, the `.bazelversion` file continues to indicate which version of the -Bazel tool is fetched and run beneath the wrapper. +The underlying version of Bazel can be configured in your `.bazelversion` file or the `BAZEL_VERSION` environment variable. ## Windows