]> git.lizzy.rs Git - rust.git/blobdiff - pre_publish.sh
clippy-driver: use rustc_tools_util to get version info.
[rust.git] / pre_publish.sh
index 960722c8c2a949c18bdf8e60a3a25523c972b21e..3602f671e3dec5de2039bc0e48e3ee2a47ba15d3 100755 (executable)
@@ -2,8 +2,21 @@
 
 set -e
 
-cd clippy_lints && cargo fmt && cd ..
-cargo fmt
-cargo test
 ./util/update_lints.py
 
+# add all changed files
+git add .
+git commit -m "Bump the version"
+
+set +e
+
+echo "Running \`cargo fmt\`.."
+
+cd clippy_lints && cargo fmt -- --write-mode=overwrite && cd ..
+cargo fmt -- --write-mode=overwrite
+
+echo "Running tests to make sure \`cargo fmt\` did not break anything.."
+
+cargo test
+
+echo "If the tests passed, review and commit the formatting changes and remember to add a git tag."