Files
pezkuwi-runtime-templates/evm-template/scripts/check-toml-sorted.sh
T
Özgün Özerk 1bb2e96501 Transition into monorepo (#180)
* evm template integrated

* workflows modified per template

* workflow fixes
2024-05-17 12:00:25 +03:00

17 lines
375 B
Bash

#!/bin/bash
find . -name "Cargo.toml" -not -path "*/target/*" -exec toml-sort {} \;
CMD="git diff --name-only"
stdbuf -oL $CMD | {
while IFS= read -r line; do
echo$line
if [[ "$line" == *"Cargo.toml" ]]; then
echo "Check fails: $line"
echo "Please run './scripts/toml-sort.sh' to format Cargo.toml files properly."
exit 1
fi
done
}