]> git.lizzy.rs Git - rust.git/blobdiff - doc/release.md
Update diagnostics.rs
[rust.git] / doc / release.md
index f0a7fe52149c679f1158e9e7787ba078e4e8bc9e..afe3033c288cffd8d95b06ea2e833989455cb81a 100644 (file)
@@ -59,8 +59,7 @@ determined.
 ```bash
 # Assuming the current directory corresponds to the Rust repository
 $ git checkout beta
-$ git submodule update
-$ BETA_SHA=$(git submodule status src/tools/clippy | awk '{print $1}')
+$ BETA_SHA=$(git log --oneline -- src/tools/clippy/ | grep -o "Merge commit '[a-f0-9]*' into .*" | head -1 | sed -e "s/Merge commit '\([a-f0-9]*\)' into .*/\1/g")
 ```
 
 After finding the Clippy commit, the `beta` branch in the Clippy repository can
@@ -69,7 +68,7 @@ be updated.
 ```bash
 # Assuming the current directory corresponds to the Clippy repository
 $ git checkout beta
-$ git rebase $BETA_SHA
+$ git reset --hard $BETA_SHA
 $ git push upstream beta
 ```
 
@@ -83,8 +82,7 @@ release. This commit can be found in the Rust repository.
 # Assuming the current directory corresponds to the Rust repository
 $ git fetch upstream    # `upstream` is the `rust-lang/rust` remote
 $ git checkout 1.XX.0   # XX should be exchanged with the corresponding version
-$ git submodule update
-$ SHA=$(git submodule status src/tools/clippy | awk '{print $1}')
+$ SHA=$(git log --oneline -- src/tools/clippy/ | grep -o "Merge commit '[a-f0-9]*' into .*" | head -1 | sed -e "s/Merge commit '\([a-f0-9]*\)' into .*/\1/g")
 ```
 
 
@@ -96,13 +94,28 @@ After finding the Clippy commit, it can be tagged with the release number.
 # Assuming the current directory corresponds to the Clippy repository
 $ git checkout $SHA
 $ git tag rust-1.XX.0               # XX should be exchanged with the corresponding version
-$ git push upstream master --tags   # `upstream` is the `rust-lang/rust-clippy` remote
+$ git push upstream rust-1.XX.0     # `upstream` is the `rust-lang/rust-clippy` remote
 ```
 
 After this, the release should be available on the Clippy [release page].
 
 [release page]: https://github.com/rust-lang/rust-clippy/releases
 
+## Update the `stable` branch
+
+At this step you should have already checked out the commit of the `rust-1.XX.0`
+tag. Updating the stable branch from here is as easy as:
+
+```bash
+# Assuming the current directory corresponds to the Clippy repository and the
+# commit of the just created rust-1.XX.0 tag is checked out.
+$ git push upstream rust-1.XX.0:stable  # `upstream` is the `rust-lang/rust-clippy` remote
+```
+
+_NOTE: Usually there are no stable backports for Clippy, so this update should
+be possible without force pushing or anything like this. If there should have
+happened a stable backport, make sure to re-merge those changes just as with the
+`beta` branch._
 
 ## Update `CHANGELOG.md`