From 15e1314209e1e6de495c4d5aa678acfacdc73344 Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Sun, 28 Feb 2021 13:09:46 -0700 Subject: [PATCH] ci: disallow uncommitted Cargo.lock changes --- ci/test-checks.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ci/test-checks.sh b/ci/test-checks.sh index d3868262e..8b6dba83a 100755 --- a/ci/test-checks.sh +++ b/ci/test-checks.sh @@ -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