InfiniTime.git

commit d757344f1b6921d84a9b3d6d42b5e0f5a472813a

Author: JF <jf@codingfield.com>

Docker post build : generate post build script with versions from the CMake project.

 CMakeLists.txt | 1 +
 docker/post_build.sh.in | 4 ++--
 src/CMakeLists.txt | 1 -


diff --git a/CMakeLists.txt b/CMakeLists.txt
index ab06161130bd7785ae2d02e3385a0414dfd92049..e7478778ff147d5a323c84895880d256af3fa479 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,6 +65,7 @@ endif()
 
 set(VERSION_EDIT_WARNING "// Do not edit this file, it is automatically generated by CMAKE!")
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docker/post_build.sh.in ${CMAKE_CURRENT_SOURCE_DIR}/docker/post_build.sh)
 
 
 add_subdirectory(src)




diff --git a/docker/post_build.sh.in b/docker/post_build.sh.in
index f5bf32fabce0bb88c8e1e736b00afa884a832f96..4db8d172d2545414efcecfa63838dc301604b26a 100755
--- a/docker/post_build.sh.in
+++ b/docker/post_build.sh.in
@@ -4,8 +4,8 @@ export LANG=C.UTF-8
 set -x
 
 mkdir -p /sources/build/output
-/opt/mcuboot/scripts/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header /sources/build/src/pinetime-mcuboot-app-0.8.0.bin /sources/build/output/image-0.8.0.bin
-adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application /sources/build/output/image-0.8.0.bin /sources/build/output/dfu-0.8.0.zip
+/opt/mcuboot/scripts/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header /sources/build/src/pinetime-mcuboot-app-@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.bin /sources/build/output/image-@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.bin
+adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application /sources/build/output/image-@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.bin /sources/build/output/dfu-@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.zip
 
 cp /sources/build/src/*.bin /sources/build/output/
 cp /sources/build/src/*.hex /sources/build/output/




diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8ccd82bc3e4405da6aec455d47bab717e45ffeaf..4032d7ea8867d4fd44839682cf0a5ae405c874ff 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -727,4 +727,3 @@             )
 
 endif()
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../docker/post_build.sh.in ${CMAKE_CURRENT_SOURCE_DIR}/../docker/post_build.sh)