CI: Check monorepo for consistent crate versions (bp #13431) (#13433)

* increment-cargo-version.sh: Add check subcommand

(cherry picked from commit 5d4015358a)

* CI: Check monorepo for consistent crate versions

(cherry picked from commit 7a4e293b3b)

Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
mergify[bot]
2020-11-06 02:29:26 +00:00
committed by GitHub
parent 3b2bdd9f8a
commit 70985f82f1
2 changed files with 15 additions and 0 deletions

View File

@@ -78,6 +78,19 @@ minor)
;;
dropspecial)
;;
check)
badTomls=()
for Cargo_toml in "${Cargo_tomls[@]}"; do
if ! grep "^version *= *\"$currentVersion\"$" "$Cargo_toml" &>/dev/null; then
badTomls+=("$Cargo_toml")
fi
done
if [[ ${#badTomls[@]} -ne 0 ]]; then
echo "Error: Incorrect crate version specified in: ${badTomls[*]}"
exit 1
fi
exit 0
;;
-*)
if [[ $1 =~ ^-[A-Za-z0-9]*$ ]]; then
SPECIAL="$1"