From 81f2747fca0abeb92b1a2919cef787288f9b7649 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Wed, 7 Apr 2021 21:08:08 -0400 Subject: [PATCH] chore: Explicitly log clang-format version --- format.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/format.sh b/format.sh index 66d9c1f..4141e49 100755 --- a/format.sh +++ b/format.sh @@ -21,8 +21,10 @@ validate() { patch="${BASH_REMATCH[3]}" fi - if ((major < required_major)) || ((minor < required_minor)) || ((patch < required_patch)); then - echo "$utility $required_major.$required_minor.$required_patch required, but is $major.$minor.$patch" + if ((major >= required_major)) && ((minor >= required_minor)) && ((patch >= required_patch)); then + echo "$utility $required_major.$required_minor.$required_patch required. Satisfied by $major.$minor.$patch" + else + echo "$utility $required_major.$required_minor.$required_patch required. Not satisfied by $major.$minor.$patch" exit 1 fi }