mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-21 04:03:11 +00:00
.
This commit is contained in:
parent
695f1a9af8
commit
faa65d7856
@ -17,7 +17,7 @@ use xtask::{
|
||||
install::{ClientOpt, InstallCmd, ServerOpt},
|
||||
not_bash::pushd,
|
||||
pre_commit, project_root,
|
||||
release::ReleaseCmd,
|
||||
release::{PromoteCmd, ReleaseCmd},
|
||||
run_clippy, run_fuzzer, run_pre_cache, run_rustfmt, Result,
|
||||
};
|
||||
|
||||
@ -105,6 +105,11 @@ FLAGS:
|
||||
args.finish()?;
|
||||
ReleaseCmd { dry_run }.run()
|
||||
}
|
||||
"promote" => {
|
||||
let dry_run = args.contains("--dry-run");
|
||||
args.finish()?;
|
||||
PromoteCmd { dry_run }.run()
|
||||
}
|
||||
"dist" => {
|
||||
let nightly = args.contains("--nightly");
|
||||
let client_version: Option<String> = args.opt_value_from_str("--client")?;
|
||||
|
@ -69,3 +69,16 @@ Release: release:{}[]
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct PromoteCmd {
|
||||
pub dry_run: bool,
|
||||
}
|
||||
|
||||
impl PromoteCmd {
|
||||
pub fn run(self) -> Result<()> {
|
||||
run!("git switch release")?;
|
||||
run!("git fetch upstream")?;
|
||||
run!("git reset --hard upstream/release")?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user