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.rs21
1 files changed, 6 insertions, 15 deletions
diff --git a/xtask/src/release.rs b/xtask/src/release.rs
index 63556476d..dde5d14ee 100644
--- a/xtask/src/release.rs
+++ b/xtask/src/release.rs
@@ -2,22 +2,17 @@ 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, Result};
6 6
7pub struct ReleaseCmd { 7impl flags::Release {
8 pub dry_run: bool, 8 pub(crate) fn run(self) -> Result<()> {
9}
10
11impl ReleaseCmd {
12 pub 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()?;
15 cmd!("git fetch upstream --tags --force").run()?; 11 cmd!("git fetch upstream --tags --force").run()?;
16 cmd!("git reset --hard tags/nightly").run()?; 12 cmd!("git reset --hard tags/nightly").run()?;
17 cmd!("git push").run()?; 13 cmd!("git push").run()?;
18 } 14 }
19 codegen::generate_assists_docs(Mode::Overwrite)?; 15 codegen::docs()?;
20 codegen::generate_feature_docs(Mode::Overwrite)?;
21 16
22 let website_root = project_root().join("../rust-analyzer.github.io"); 17 let website_root = project_root().join("../rust-analyzer.github.io");
23 let changelog_dir = website_root.join("./thisweek/_posts"); 18 let changelog_dir = website_root.join("./thisweek/_posts");
@@ -86,12 +81,8 @@ https://github.com/sponsors/rust-analyzer[GitHub Sponsors].
86 } 81 }
87} 82}
88 83
89pub struct PromoteCmd { 84impl flags::Promote {
90 pub dry_run: bool, 85 pub(crate) fn run(self) -> Result<()> {
91}
92
93impl PromoteCmd {
94 pub fn run(self) -> Result<()> {
95 let _dir = pushd("../rust-rust-analyzer")?; 86 let _dir = pushd("../rust-rust-analyzer")?;
96 cmd!("git switch master").run()?; 87 cmd!("git switch master").run()?;
97 cmd!("git fetch upstream").run()?; 88 cmd!("git fetch upstream").run()?;