2021-05-04 06:05:04 +00:00
|
|
|
#!/bin/sh
|
2021-11-30 12:54:55 +00:00
|
|
|
# Requires: pkg install portfmt yq
|
2021-05-04 06:05:04 +00:00
|
|
|
# Run in lang/rust
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
fetch -qo /tmp/channel-rust-stable.toml https://dev-static.rust-lang.org/dist/channel-rust-stable.toml
|
2021-11-30 12:54:55 +00:00
|
|
|
version=$(</tmp/channel-rust-stable.toml tomlq -r '.pkg.rustc.version | split(" ")[0]')
|
|
|
|
new_commit=$(</tmp/channel-rust-stable.toml tomlq -r '.pkg.rustc.git_commit_hash')
|
2021-05-04 06:05:04 +00:00
|
|
|
rm /tmp/channel-rust-stable.toml
|
|
|
|
|
2021-11-30 12:54:55 +00:00
|
|
|
fetch -qo - https://raw.githubusercontent.com/rust-lang/rust/${new_commit}/src/stage0.json | jq -r '
|
|
|
|
"BOOTSTRAPS_DATE=\(.compiler.date)",
|
|
|
|
"RUST_BOOTSTRAP_VERSION=\(.compiler.version)"
|
|
|
|
' | portedit merge -i .
|
2021-05-04 06:05:04 +00:00
|
|
|
|
2022-11-08 09:12:59 +00:00
|
|
|
cat <<EOF | sed -i '' -E -f - ../../Mk/Uses/cargo.mk ../../Mk/bsd.gecko.mk
|
|
|
|
1,/\\$\\{RUST_DEFAULT\\}>=/ {
|
|
|
|
s,(\\$\\{RUST_DEFAULT\\}>=).*(:lang/\\$\\{RUST_DEFAULT\\}),\\1${version}\\2,
|
|
|
|
}
|
|
|
|
EOF
|
2021-05-04 06:05:04 +00:00
|
|
|
|
|
|
|
portedit set-version -i "${version}" .
|
|
|
|
portedit set-version -i "${version}" ../rust-bootstrap
|
2021-11-30 12:54:55 +00:00
|
|
|
|
|
|
|
make makesum
|
2021-05-04 06:05:04 +00:00
|
|
|
make -C ../rust-bootstrap makesum
|
|
|
|
|
|
|
|
echo "lang/rust: Update to ${version}
|
|
|
|
|
2022-02-03 14:02:32 +00:00
|
|
|
https://blog.rust-lang.org/FIXME/Rust-${version}.html
|
|
|
|
|
2021-05-04 06:05:04 +00:00
|
|
|
PR: FIXME
|
|
|
|
Exp-run by: antoine
|
|
|
|
Differential Revision: FIXME" >rust.msg
|