mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-10 15:14:32 +00:00
.
This commit is contained in:
parent
695f1a9af8
commit
faa65d7856
2 changed files with 19 additions and 1 deletions
|
@ -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 a new issue