Skip to content

feat(dist): add installer release metadata updater - #5201

Open
Kaileshwar16 wants to merge 1 commit into
rust-lang:mainfrom
Kaileshwar16:fix/5187-installer-release-metadata
Open

Kaileshwar16 wants to merge 1 commit into
rust-lang:mainfrom
Kaileshwar16:fix/5187-installer-release-metadata

Conversation

@Kaileshwar16

Copy link
Copy Markdown
Contributor

part of #5187

This adds a small helper to update the version, commit SHA, and date in rustup-init.sh during release preparation. It reads these values from the selected release branch to avoid using the current feature-branch commit. It validates existing metadata before making changes and leaves the file unchanged when run again with the same inputs.

Comment thread ci/update-rustup-init.py Resolved
@Kaileshwar16
Kaileshwar16 requested a review from djc November 9, 2026 11:37

@rami3l rami3l left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for helping out!

View changes since this review

Comment thread xtask/src/main.rs
@@ -0,0 +1,77 @@
use std::{env, fs, process::Command};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think making this an example is harmful, because each example implicitly relies on the whole crate. Clearly, your previous Python script has demonstrated that there is no point in depending on anything in the global crate, so it'd be a better solution to use the xtask pattern here.

Comment thread ci/update-rustup-init.py Resolved
@Kaileshwar16
Kaileshwar16 force-pushed the fix/5187-installer-release-metadata branch from ca14579 to 1a4fb04 Compare November 12, 2026 16:47
@Kaileshwar16

Copy link
Copy Markdown
Contributor Author

thanks for the review, i have moved the updater to standlone xtask package and squashed the commit as suggested

@Kaileshwar16
Kaileshwar16 requested a review from rami3l November 12, 2026 17:06

@rami3l rami3l left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are getting pretty close, thanks again :)

View changes since this review

Comment thread xtask/src/main.rs Outdated
.get("package")
.and_then(|package| package.get("version"))
.and_then(toml::Value::as_str)
.context("expected package.version in the release source to be X.Y.Z")?;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks more like "to exist" rather than "to be X.Y.Z"?

Comment thread doc/dev-guide/src/release-process.md Outdated
your remote for `rust-lang/rustup`):
```console
$ git fetch upstream
$ cargo run --manifest-path xtask/Cargo.toml -- upstream/$BRANCH

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the key point of the xtask pattern is that you can modify .cargo/config.toml so that this command is simplified to cargo xtask bump-release. Keep this extensible so this xtask crate can include more subcommands in the future.

@Kaileshwar16
Kaileshwar16 force-pushed the fix/5187-installer-release-metadata branch from 1a4fb04 to c436111 Compare November 16, 2026 15:59
@Kaileshwar16

Copy link
Copy Markdown
Contributor Author

thanks a lot for the review, i have addressed the feedbacks u left

@rami3l rami3l self-assigned this Nov 16, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants