]> git.lizzy.rs Git - rust.git/commitdiff
internal: make normal release after a poin release less annoying
authorAleksey Kladov <aleksey.kladov@gmail.com>
Mon, 26 Apr 2021 10:41:34 +0000 (13:41 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Mon, 26 Apr 2021 10:41:34 +0000 (13:41 +0300)
xtask/src/release.rs

index 22bb504674fb69988c7a6709485af1ba48d74127..f7e6dca4e44721872410dc2dd99b7305da1802ef 100644 (file)
@@ -10,7 +10,16 @@ pub(crate) fn run(self) -> Result<()> {
             cmd!("git switch release").run()?;
             cmd!("git fetch upstream --tags --force").run()?;
             cmd!("git reset --hard tags/nightly").run()?;
-            cmd!("git push").run()?;
+            // The `release` branch sometimes have a couple of cherry-picked
+            // commits for patch releases. If that's the case, just overwrite
+            // it. As we are setting `release` branch to an up-to-date `nightly`
+            // tag, this shouldn't be problematic in general.
+            //
+            // Note that, as we tag releases, we don't worry about "loosing"
+            // commits -- they'll be kept alive by the tag. More generally, we
+            // don't care about historic releases all that much, it's fine even
+            // to delete old tags.
+            cmd!("git push --force").run()?;
         }
         codegen::docs()?;