Skip to content
Permalink
Browse files

format: check version of cmake-format

  • Loading branch information...
kodebach committed Aug 9, 2019
1 parent 66089a9 commit 76f82fb0ec59b8fe1c5512bed6b10e35f7d1c556
Showing with 9 additions and 4 deletions.
  1. +4 −0 doc/news/_preparation_next_release.md
  2. +5 −4 scripts/reformat-cmake
@@ -140,6 +140,10 @@ you up to date with the multi-language support provided by Elektra.
- <<TODO>>
- <<TODO>>

### Other

- The reformatting script now checks that the correct version of `cmake-format` is used. _(Klemens Böswirth)_

## Infrastructure

### Cirrus
@@ -9,14 +9,15 @@ SCRIPTS_DIR=$(dirname "$0")
. "${SCRIPTS_DIR}/include-common"

CMAKE_FORMAT=$(which cmake-format)
CMAKE_FORMAT_VERSION=$("$CMAKE_FORMAT" --version)

cd "$SOURCE"

if [ -z "${CMAKE_FORMAT}" ]; then
printf 2>&1 'Please install `cmake-format`\n'
if [ -z "${CMAKE_FORMAT}" ] || [ "$CMAKE_FORMAT_VERSION" != "0.5.4" ]; then
printf 2>&1 'Please install `cmake-format` version 0.5.4\n'
exit 1
fi

cd "$SOURCE" || exit 1

output=$("${CMAKE_FORMAT}" 2>&1 CMakeLists.txt)

if [ $? != 0 ]; then

0 comments on commit 76f82fb

Please sign in to comment.
You can’t perform that action at this time.