aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/release.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/release.rs')
-rw-r--r--xtask/src/release.rs14
1 files changed, 3 insertions, 11 deletions
diff --git a/xtask/src/release.rs b/xtask/src/release.rs
index 5008881e4..d8d86fd63 100644
--- a/xtask/src/release.rs
+++ b/xtask/src/release.rs
@@ -2,13 +2,9 @@ use std::fmt::Write;
2 2
3use xshell::{cmd, cp, pushd, read_dir, write_file}; 3use xshell::{cmd, cp, pushd, read_dir, write_file};
4 4
5use crate::{codegen, date_iso, is_release_tag, project_root, Mode, Result}; 5use crate::{codegen, date_iso, flags, is_release_tag, project_root, Mode, Result};
6 6
7pub(crate) struct ReleaseCmd { 7impl flags::Release {
8 pub(crate) dry_run: bool,
9}
10
11impl ReleaseCmd {
12 pub(crate) fn run(self) -> Result<()> { 8 pub(crate) fn run(self) -> Result<()> {
13 if !self.dry_run { 9 if !self.dry_run {
14 cmd!("git switch release").run()?; 10 cmd!("git switch release").run()?;
@@ -86,11 +82,7 @@ https://github.com/sponsors/rust-analyzer[GitHub Sponsors].
86 } 82 }
87} 83}
88 84
89pub(crate) struct PromoteCmd { 85impl flags::Promote {
90 pub(crate) dry_run: bool,
91}
92
93impl PromoteCmd {
94 pub(crate) fn run(self) -> Result<()> { 86 pub(crate) fn run(self) -> Result<()> {
95 let _dir = pushd("../rust-rust-analyzer")?; 87 let _dir = pushd("../rust-rust-analyzer")?;
96 cmd!("git switch master").run()?; 88 cmd!("git switch master").run()?;