Commit d4a807c8 authored by Ghislain MARY's avatar Ghislain MARY

Fail if package creation is not successful.

parent 8f03b7ae
Pipeline #693 passed with stage
in 12 minutes and 51 seconds
......@@ -23,6 +23,9 @@
if (NOT "${CMAKE_INSTALL_PREFIX}" MATCHES .*/_CPack_Packages/.*)
execute_process(
COMMAND ${CMAKE_CPACK_COMMAND} -G DragNDrop
RESULT_VARIABLE CPACK_COMMAND_SUCCESS
RESULT_VARIABLE CPACK_COMMAND_RESULT
)
if(CPACK_COMMAND_RESULT)
message(FATAL_ERROR "Failed to create dmg package!")
endif()
endif ()
......@@ -23,12 +23,19 @@
if (NOT "${CMAKE_INSTALL_PREFIX}" MATCHES .*/_CPack_Packages/.*)
execute_process(
COMMAND ${CMAKE_CPACK_COMMAND} -G @CPACK_GENERATOR@
RESULT_VARIABLE CPACK_COMMAND_SUCCESS
RESULT_VARIABLE CPACK_COMMAND_RESULT
)
if(CPACK_COMMAND_RESULT)
message(FATAL_ERROR "Failed to generate package!")
endif()
if (@PERFORM_SIGNING@)
execute_process(
COMMAND @SIGNTOOL_COMMAND@ @CMAKE_CURRENT_BINARY_DIR@/@CPACK_PACKAGE_FILE_NAME@.@PACKAGE_EXT@
RESULT_VARIABLE SIGNING_RESULT
)
if(SIGNING_RESULT)
message(FATAL_ERROR "Failed to sign the package!")
endif()
endif ()
endif ()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment