Files
concrete/.github/workflows/scripts/format_cmake.sh
2022-11-18 15:15:41 +01:00

13 lines
367 B
Bash
Executable File

#!/bin/bash
set -e -o pipefail
cmake-format -i compiler/CMakeLists.txt -c compiler/.cmake-format-config.py
find ./compiler/{include,lib,src,tests} -type f -name "CMakeLists.txt" | xargs -I % sh -c 'cmake-format -i % -c compiler/.cmake-format-config.py'
# show changes if any
git --no-pager diff
# fail if there is a diff, success otherwise
git diff | ifne exit 1