From 9e354803de9b77fa251d7f9d024a977de608b5d6 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Thu, 9 Apr 2020 21:28:48 +0200 Subject: [PATCH] Changed publish.sh to update the CMake project version --- CMakeLists.txt | 3 ++- extras/scripts/publish.sh | 3 +++ src/CMakeLists.txt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e05897a8..0de4f9f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,8 @@ # MIT License cmake_minimum_required(VERSION 3.0) -project(ArduinoJson) + +project(ArduinoJson VERSION 6.15.1) set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true) diff --git a/extras/scripts/publish.sh b/extras/scripts/publish.sh index 915dffe1..47010f7a 100755 --- a/extras/scripts/publish.sh +++ b/extras/scripts/publish.sh @@ -19,6 +19,9 @@ update_version_in_source () { sed -i~ -bE "4s/HEAD/$TAG ($DATE)/; 5s/-+/$UNDERLINE/" CHANGELOG.md rm CHANGELOG.md*~ + sed -i~ -bE "s/(project\\s*\\(ArduinoJson\\s+VERSION\\s+).*?\\)/\\1$MAJOR.$MINOR.$REVISION)/" CMakeLists.txt + rm CMakeLists.json*~ + sed -i~ -bE "s/\"version\":.*$/\"version\": \"$VERSION\",/" library.json rm library.json*~ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6bac23ed..26daec2f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -35,7 +35,7 @@ include(CMakePackageConfigHelpers) write_basic_package_version_file( "${PROJECT_BINARY_DIR}/ArduinoJsonConfigVersion.cmake" VERSION - 6.15.0 + ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion )