diff options
Diffstat (limited to 'xtask/src/release.rs')
-rw-r--r-- | xtask/src/release.rs | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/xtask/src/release.rs b/xtask/src/release.rs index d2d769099..170cfee9f 100644 --- a/xtask/src/release.rs +++ b/xtask/src/release.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use crate::{ | 1 | use crate::{ |
2 | codegen, is_release_tag, | 2 | codegen, is_release_tag, |
3 | not_bash::{date_iso, fs2, run}, | 3 | not_bash::{date_iso, fs2, pushd, run}, |
4 | project_root, Mode, Result, | 4 | project_root, Mode, Result, |
5 | }; | 5 | }; |
6 | 6 | ||
@@ -76,9 +76,25 @@ pub struct PromoteCmd { | |||
76 | 76 | ||
77 | impl PromoteCmd { | 77 | impl PromoteCmd { |
78 | pub fn run(self) -> Result<()> { | 78 | pub fn run(self) -> Result<()> { |
79 | run!("git switch release")?; | 79 | let _dir = pushd("../rust-rust-analyzer"); |
80 | run!("git switch master")?; | ||
80 | run!("git fetch upstream")?; | 81 | run!("git fetch upstream")?; |
81 | run!("git reset --hard upstream/release")?; | 82 | run!("git reset --hard upstream/master")?; |
83 | run!("git submodule update --recursive")?; | ||
84 | |||
85 | let branch = format!("rust-analyzer-{}", date_iso()?); | ||
86 | run!("git switch -c {}", branch)?; | ||
87 | { | ||
88 | let _dir = pushd("src/tools/rust-analyzer"); | ||
89 | run!("git fetch origin")?; | ||
90 | run!("git reset --hard origin/release")?; | ||
91 | } | ||
92 | run!("git add src/tools/rust-analyzer")?; | ||
93 | run!("git commit -m':arrow_up: rust-analyzer'")?; | ||
94 | if !self.dry_run { | ||
95 | run!("git push")?; | ||
96 | run!("xdg-open https://github.com/matklad/rust/pull/new/{}", branch)?; | ||
97 | } | ||
82 | Ok(()) | 98 | Ok(()) |
83 | } | 99 | } |
84 | } | 100 | } |