mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +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},
|
install::{ClientOpt, InstallCmd, ServerOpt},
|
||||||
not_bash::pushd,
|
not_bash::pushd,
|
||||||
pre_commit, project_root,
|
pre_commit, project_root,
|
||||||
release::ReleaseCmd,
|
release::{PromoteCmd, ReleaseCmd},
|
||||||
run_clippy, run_fuzzer, run_pre_cache, run_rustfmt, Result,
|
run_clippy, run_fuzzer, run_pre_cache, run_rustfmt, Result,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -105,6 +105,11 @@ FLAGS:
|
||||||
args.finish()?;
|
args.finish()?;
|
||||||
ReleaseCmd { dry_run }.run()
|
ReleaseCmd { dry_run }.run()
|
||||||
}
|
}
|
||||||
|
"promote" => {
|
||||||
|
let dry_run = args.contains("--dry-run");
|
||||||
|
args.finish()?;
|
||||||
|
PromoteCmd { dry_run }.run()
|
||||||
|
}
|
||||||
"dist" => {
|
"dist" => {
|
||||||
let nightly = args.contains("--nightly");
|
let nightly = args.contains("--nightly");
|
||||||
let client_version: Option<String> = args.opt_value_from_str("--client")?;
|
let client_version: Option<String> = args.opt_value_from_str("--client")?;
|
||||||
|
|
|
@ -69,3 +69,16 @@ Release: release:{}[]
|
||||||
Ok(())
|
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…
Add table
Add a link
Reference in a new issue