Changed publish.sh to update the CMake project version

This commit is contained in:
Benoit Blanchon
2020-04-09 21:28:48 +02:00
parent 3ea5eb3f3a
commit 9e354803de
3 changed files with 6 additions and 2 deletions

View File

@ -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)

View File

@ -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*~

View File

@ -35,7 +35,7 @@ include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${PROJECT_BINARY_DIR}/ArduinoJsonConfigVersion.cmake"
VERSION
6.15.0
${PROJECT_VERSION}
COMPATIBILITY
SameMajorVersion
)