diff options
Diffstat (limited to 'xtask/src/lib.rs')
-rw-r--r-- | xtask/src/lib.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs index d2ef2e95b..301a88324 100644 --- a/xtask/src/lib.rs +++ b/xtask/src/lib.rs | |||
@@ -158,11 +158,13 @@ fn rm_rf(path: &Path) -> Result<()> { | |||
158 | .with_context(|| format!("failed to remove {:?}", path)) | 158 | .with_context(|| format!("failed to remove {:?}", path)) |
159 | } | 159 | } |
160 | 160 | ||
161 | pub fn run_release() -> Result<()> { | 161 | pub fn run_release(dry_run: bool) -> Result<()> { |
162 | run!("git switch release")?; | 162 | if !dry_run { |
163 | run!("git fetch upstream")?; | 163 | run!("git switch release")?; |
164 | run!("git reset --hard upstream/master")?; | 164 | run!("git fetch upstream")?; |
165 | run!("git push")?; | 165 | run!("git reset --hard upstream/master")?; |
166 | run!("git push")?; | ||
167 | } | ||
166 | 168 | ||
167 | let changelog_dir = project_root().join("../rust-analyzer.github.io/thisweek/_posts"); | 169 | let changelog_dir = project_root().join("../rust-analyzer.github.io/thisweek/_posts"); |
168 | 170 | ||