Skip to content

Commit

Permalink
Docker post build : generate post build script with versions from the…
Browse files Browse the repository at this point in the history
… CMake project.
  • Loading branch information
JF002 committed Sep 8, 2020
1 parent 4e8e52b commit d757344
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions docker/post_build.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -727,4 +727,3 @@ elseif(USE_OPENOCD)

endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../docker/post_build.sh.in ${CMAKE_CURRENT_SOURCE_DIR}/../docker/post_build.sh)

0 comments on commit d757344

Please sign in to comment.