Skip to content

Commit edb69bd

Browse files
BD103DaAlbrecht
andauthored
Make install commands copy-pasteable (#475)
This makes it so users getting started can copy-paste the installation commands necessary for both the CLI and the linter, easing onboarding. I also added an extra step in the release checklist so that these values get updated every release, so they don't fall behind. Addresses [this comment on Discord](https://discord.com/channels/691052431525675048/1278871953721262090/1380381197930074232). --------- Co-authored-by: DAA <42379074+DaAlbrecht@users.noreply.github.com>
1 parent dca53bc commit edb69bd

File tree

6 files changed

+28
-24
lines changed

6 files changed

+28
-24
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ If you need assistance or want to help, reach out to the [`bevy_cli` working gro
2020

2121
As the CLI is currently an unofficial tool, it is not yet published to <https://crates.io>. It is available [on Github](https://github.com/TheBevyFlock/bevy_cli), however.
2222

23-
You may compile the CLI from scratch using `cargo install`. To install the latest release, make sure to specify the version you wish in the tag (ex. `--tag cli-v0.1.0-alpha.1`).
23+
You may compile the latest version of the CLI from scratch using `cargo install`:
2424

2525
```sh
26-
cargo install --git https://github.com/TheBevyFlock/bevy_cli --tag cli-vX.Y.Z --locked bevy_cli
26+
cargo install --git https://github.com/TheBevyFlock/bevy_cli --tag cli-v0.1.0-alpha.1 --locked bevy_cli
2727
```
2828

2929
<details>
@@ -32,7 +32,7 @@ cargo install --git https://github.com/TheBevyFlock/bevy_cli --tag cli-vX.Y.Z --
3232
The CLI is precompiled for Linux, Windows, and macOS. You may install the latest precompiled binary using [`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall):
3333

3434
```sh
35-
cargo binstall --git https://github.com/TheBevyFlock/bevy_cli --version vX.Y.Z --locked bevy_cli
35+
cargo binstall --git https://github.com/TheBevyFlock/bevy_cli --version 0.1.0-alpha.1 --locked bevy_cli
3636
```
3737

3838
You can manually download the precompiled binaries from the [release page](https://github.com/TheBevyFlock/bevy_cli/releases).

bevy_lint/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,31 @@ see <https://linebender.org/blog/doc-include/>.
2727

2828
## Installation
2929

30-
`bevy_lint` depends on a pinned nightly version of Rust with the `rustc-dev` Rustup component. This is because `bevy_lint` uses [internal `rustc` crates](https://doc.rust-lang.org/nightly/nightly-rustc/) that can only be imported with the permanently-unstable [`rustc_private` feature](https://doc.rust-lang.org/nightly/unstable-book/language-features/rustc-private.html). You can refer to the [compatibility table](#compatibility) to see which version of the linter requires which toolchain.
30+
`bevy_lint` depends on a pinned nightly version of Rust with the `rustc-dev` Rustup component. This is because `bevy_lint` uses [internal `rustc` crates](https://doc.rust-lang.org/nightly/nightly-rustc/) that can only be imported with the permanently-unstable [`rustc_private` feature](https://doc.rust-lang.org/nightly/unstable-book/language-features/rustc-private.html). You can refer to the [compatibility table](https://thebevyflock.github.io/bevy_cli/linter/compatibility.html) to see which version of the linter requires which toolchain.
3131

32-
You can install the toolchain with:
32+
You can install the toolchain required for the latest release with:
3333

3434
```sh
35-
rustup toolchain install $TOOLCHAIN_VERSION \
35+
rustup toolchain install nightly-2025-04-03 \
3636
--component rustc-dev \
3737
--component llvm-tools-preview
3838
```
3939

40-
For example, you would replace `$TOOLCHAIN_VERSION` with `nightly-2024-11-14` if you were installing `bevy_lint` v0.1.0, based on the [compatibility table](#compatibility). Please be aware that you must keep this toolchain installed for `bevy_lint` to function[^keep-toolchain-installed].
40+
If you are installing a different version of the linter, you may need to install a different nightly toolchain as specified by the [compatibility table](https://thebevyflock.github.io/bevy_cli/linter/compatibility.html). Please be aware that you must keep this toolchain installed for `bevy_lint` to function[^keep-toolchain-installed].
4141

4242
[^keep-toolchain-installed]: `bevy_lint` imports internal `rustc` libraries in order to hook into the compiler process. These crates are stored in a [dynamic library](https://en.wikipedia.org/wiki/Dynamic_linker) that is installed with the `rustc-dev` component and loaded by `bevy_lint` at runtime. Uninstalling the nightly toolchain would remove this dynamic library, causing `bevy_lint` to fail.
4343

4444
Once you have the toolchain installed, you can compile and install `bevy_lint` through `cargo`:
4545

4646
```sh
47-
rustup run $TOOLCHAIN_VERSION cargo install \
47+
rustup run nightly-2025-04-03 cargo install \
4848
--git https://github.com/TheBevyFlock/bevy_cli.git \
49-
--tag $TAG \
49+
--tag lint-v0.3.0 \
5050
--locked \
5151
bevy_lint
5252
```
5353

54-
Make sure to replace `$TOOLCHAIN_VERSION` and `$TAG` in the above command. The tag for a specific release can be found in the [releases tab](https://github.com/TheBevyFlock/bevy_cli/releases). For example, the tag for v0.1.0 is `lint-v0.1.0`.
54+
If you're installing a different version of the linter, you may need to switch the toolchain and tag in the above command.
5555

5656
## Getting Started
5757

docs/src/cli/install.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
As the CLI is currently an unofficial tool, it is not yet published to <https://crates.io>. It is available [on Github](https://github.com/TheBevyFlock/bevy_cli), however.
66

7-
You may compile the CLI from scratch using `cargo install`. To install the latest release, make sure to specify the version you wish in the tag (ex. `--tag cli-v0.1.0-alpha.1`).
7+
You may compile the latest version of the CLI from scratch using `cargo install`:
88

99
```sh
10-
cargo install --git https://github.com/TheBevyFlock/bevy_cli --tag cli-vX.Y.Z --locked bevy_cli
10+
cargo install --git https://github.com/TheBevyFlock/bevy_cli --tag cli-v0.1.0-alpha.1 --locked bevy_cli
1111
```
1212

1313
<details>
@@ -16,7 +16,7 @@ cargo install --git https://github.com/TheBevyFlock/bevy_cli --tag cli-vX.Y.Z --
1616
The CLI is precompiled for Linux, Windows, and macOS. You may install the latest precompiled binary using [`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall):
1717

1818
```sh
19-
cargo binstall --git https://github.com/TheBevyFlock/bevy_cli --version vX.Y.Z --locked bevy_cli
19+
cargo binstall --git https://github.com/TheBevyFlock/bevy_cli --version 0.1.0-alpha.1 --locked bevy_cli
2020
```
2121

2222
You can manually download the precompiled binaries from the [release page](https://github.com/TheBevyFlock/bevy_cli/releases).

docs/src/contribute/cli/release.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
5. Remove the `-dev` suffix from the version in `Cargo.toml`.
1010
- Please ensure that `Cargo.lock` also updates!
1111
6. Update both instances of hard-coded version in the URL under `[package.metadata.binstall]` in `Cargo.toml` to be the new version.
12-
7. Commit your changes and open a pull request.
13-
8. Merge the PR once a core Bevy maintainer approves it with no outstanding issues from other contributors.
12+
7. Update the `cargo install` and `cargo binstall` commands in the `README.md` and the [install page](../../cli/install.md) to use the latest version.
13+
8. Commit your changes and open a pull request.
14+
9. Merge the PR once a core Bevy maintainer approves it with no outstanding issues from other contributors.
1415
- This starts the release process, enacting a freeze on all other changes until the release has finished. While maintainers need to be aware of this so they do not merge PRs during this time, the release process should take less than an hour, so it's unlikely to ever be an issue.
1516

1617
## Release on Github

docs/src/contribute/linter/how-to/release.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
- Please ensure that `Cargo.lock` also updates!
1111
6. Replace `--branch main` in `action.yml` with `--tag lint-vX.Y.Z`.
1212
- The `linter-action.yml` workflow may fail as the tag does not exist yet. This is fine!
13-
7. Commit all of these changes and open a pull request.
14-
8. Merge the PR once a core Bevy maintainer approves it with no outstanding issues from other contributors.
13+
7. Update the toolchain install, `bevy_lint` install, and `bevy_lint` uninstall commands in both `README.md` and the [install page](../../../linter/install.md) to use the latest version and toolchain.
14+
8. Commit all of these changes and open a pull request.
15+
9. Merge the PR once a core Bevy maintainer approves it with no outstanding issues from other contributors.
1516
- This starts the release process, enacting a freeze on all other changes until the release has finished. While maintainers need to be aware of this so they do not merge PRs during this time, the release process should take less than an hour, so it's unlikely to ever be an issue.
1617

1718
## Release on Github

docs/src/linter/install.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,39 +25,41 @@ bevy lint --yes
2525

2626
`bevy_lint` depends on a pinned nightly version of Rust with the `rustc-dev` Rustup component. This is because `bevy_lint` uses [internal `rustc` crates](https://doc.rust-lang.org/nightly/nightly-rustc/) that can only be imported with the permanently-unstable [`rustc_private` feature](https://doc.rust-lang.org/nightly/unstable-book/language-features/rustc-private.html). You can refer to the [compatibility table](compatibility.md) to see which version of the linter requires which toolchain.
2727

28-
You can install the toolchain with:
28+
You can install the toolchain required for the latest release with:
2929

3030
```sh
31-
rustup toolchain install $TOOLCHAIN_VERSION \
31+
rustup toolchain install nightly-2025-04-03 \
3232
--component rustc-dev \
3333
--component llvm-tools-preview
3434
```
3535

36-
For example, you would replace `$TOOLCHAIN_VERSION` with `nightly-2024-11-14` if you were installing `bevy_lint` v0.1.0, based on the [compatibility table](compatibility.md). Please be aware that you must keep this toolchain installed for `bevy_lint` to function[^keep-toolchain-installed].
36+
If you are installing a different version of the linter, you may need to install a different nightly toolchain as specified by the [compatibility table](compatibility.md). Please be aware that you must keep this toolchain installed for `bevy_lint` to function[^keep-toolchain-installed].
3737

3838
[^keep-toolchain-installed]: `bevy_lint` imports internal `rustc` libraries in order to hook into the compiler process. These crates are stored in a [dynamic library](https://en.wikipedia.org/wiki/Dynamic_linker) that is installed with the `rustc-dev` component and loaded by `bevy_lint` at runtime. Uninstalling the nightly toolchain would remove this dynamic library, causing `bevy_lint` to fail.
3939

4040
Once you have the toolchain installed, you can compile and install `bevy_lint` through `cargo`:
4141

4242
```sh
43-
rustup run $TOOLCHAIN_VERSION cargo install \
43+
rustup run nightly-2025-04-03 cargo install \
4444
--git https://github.com/TheBevyFlock/bevy_cli.git \
45-
--tag $TAG \
45+
--tag lint-v0.3.0 \
4646
--locked \
4747
bevy_lint
4848
```
4949

50-
Make sure to replace `$TOOLCHAIN_VERSION` and `$TAG` in the above command. The tag for a specific release can be found in the [releases tab](https://github.com/TheBevyFlock/bevy_cli/releases). For example, the tag for v0.1.0 is `lint-v0.1.0`.
50+
If you're installing a different version of the linter, you may need to switch the toolchain and tag in the above command.
5151

5252
## Uninstall
5353

5454
If you wish to uninstall the linter at any time, you may use Cargo and Rustup to do so:
5555

5656
```sh
5757
cargo uninstall bevy_lint
58-
rustup toolchain uninstall $TOOLCHAIN_VERSION
58+
rustup toolchain uninstall nightly-2025-04-03
5959
```
6060

61+
If you're uninstalling an older version of the linter, such as when you are [upgrading](#upgrade), you may need to uninstall a different toolchain version than the one in the above command. Check out the [compatibility table](compatibility.md) to see which version uses which toolchain.
62+
6163
## Upgrade
6264

6365
To upgrade to a newer version of the linter, first [uninstall it](#uninstall) then follow the [CLI](#cli) or [manual](#manual) installation instructions.

0 commit comments

Comments
 (0)