ci: disallow uncommitted Cargo.lock changes

This commit is contained in:
Trent Nelson 2021-02-28 13:09:46 -07:00 committed by Trent Nelson
parent 3c1dd891af
commit 15e1314209
1 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,16 @@ cargo="$(readlink -f "./cargo")"
scripts/increment-cargo-version.sh check
# Disallow uncommitted Cargo.lock changes
(
_ scripts/cargo-for-all-lock-files.sh tree
set +e
if ! _ git diff --exit-code; then
echo -e "\nError: Uncommitted Cargo.lock changes" 1>&2
exit 1
fi
)
echo --- build environment
(
set -x