X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=pre_publish.sh;h=3602f671e3dec5de2039bc0e48e3ee2a47ba15d3;hb=6967cf59a4f5664d97086ddccd8cc9b29778d0b7;hp=960722c8c2a949c18bdf8e60a3a25523c972b21e;hpb=0773b80d65800b22088066747c65d9b56eb631f4;p=rust.git diff --git a/pre_publish.sh b/pre_publish.sh index 960722c8c2a..3602f671e3d 100755 --- a/pre_publish.sh +++ b/pre_publish.sh @@ -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."