From c1ff60afc2c881d283b44070b7ed14ad80ef6474 Mon Sep 17 00:00:00 2001 From: Alistair Singh Date: Wed, 19 Jul 2023 19:50:34 +0200 Subject: [PATCH] Check for duplicate versions of substrate and polkadot (#891) * modified pre-commit * fixes * testing * testing * testing --- .husky/pre-commit | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.husky/pre-commit b/.husky/pre-commit index 8a6e91cbc06dc..6df370484c150 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -17,4 +17,17 @@ chronic typos . # comment here and run `cargo +nightly fmt` manually without nix for https://github.com/oxalica/rust-overlay/issues/66#issuecomment-993816000 #(cd parachain && SKIP_WASM_BUILD= cargo +nightly fmt --all) +check_duplicate_versions() { + local duplicates=`grep -Ei "source = \"git.*$1" cumulus/Cargo.lock parachain/Cargo.lock | sed 's/\.git//g' | sort -u` + local version_count=`echo "$duplicates" | awk -F':' '{for (i=2; i