@@ -18,22 +18,40 @@ This gets called by `promote-release` <https://github.com/rust-lang/promote-rele
1818 a. If appropriate, call ` tarball.is_preview(true) ` for the component.
19192 . Add a new ` PkgType ` to build-manifest. Fix all the compile errors as appropriate.
2020
21- ## Testing changes locally
21+ ## Testing changes locally with rustup
2222
2323In order to test the changes locally you need to have a valid dist directory
2424available locally. If you don't want to build all the compiler, you can easily
2525create one from the nightly artifacts with:
2626
2727``` sh
2828for component in rust rustc rust-std rust-docs cargo; do
29- wget -P build/dist https://static.rust-lang.org/dist/${component} -nightly-x86_64-unknown-linux-gnu.tar.gz
29+ wget -P build/dist https://static.rust-lang.org/dist/${component} -nightly-x86_64-unknown-linux-gnu.tar.xz
3030done
3131```
3232
33- Then, you can generate the manifest and all the packages from ` build/dist ` to
34- ` build/manifest ` with:
33+ Then, you can generate the manifest and add it to ` build/dist ` :
3534
3635``` sh
37- mkdir -p build/manifest
38- cargo +nightly run --release -p build-manifest build/dist build/manifest 1970-01-01 http://example.com nightly
36+ cargo +nightly run --release -p build-manifest build/dist build/dist 1970-01-01 http://localhost:8000 nightly
3937```
38+
39+ After that, generate a SHA256 stamp for the manifest file:
40+ ``` sh
41+ sha256sum build/dist/channel-rust-nightly.toml > build/dist/channel-rust-nightly.toml.sha256
42+ ```
43+
44+ And start a HTTP server from the ` build ` directory:
45+ ``` sh
46+ cd build
47+ python3 -m http.server 8000
48+ ```
49+
50+ After you do all that, you can then install the locally generated components with rustup:
51+ ```
52+ rustup uninstall nightly
53+ RUSTUP_DIST_SERVER=http://localhost:8000 rustup toolchain install nightly --profile minimal
54+ RUSTUP_DIST_SERVER=http://localhost:8000 rustup +nightly component add <my-new-component>
55+ ```
56+
57+ Note that generally it will not work to combine components built locally and those built from CI (nightly). Ideally, if you want to ship new rustup components, first dist them in nightly, and then test everything from nightly here after it's available on CI.
0 commit comments