diff options
Diffstat (limited to 'Utilities/Release/release_cmake.cmake')
-rw-r--r-- | Utilities/Release/release_cmake.cmake | 54 |
1 files changed, 41 insertions, 13 deletions
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 2080946..20a6c3d 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -1,6 +1,10 @@ set(CVSROOT ":pserver:anonymous@www.cmake.org:/cvsroot/CMake") get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH) +# default to self extracting tgz, tgz, and tar.Z +if(NOT DEFINED CPACK_BINARY_GENERATORS) + set(CPACK_BINARY_GENERATORS "STGZ TGZ TZ") +endif(NOT DEFINED CPACK_BINARY_GENERATORS) if(DEFINED EXTRA_COPY) set(HAS_EXTRA_COPY 1) endif(DEFINED EXTRA_COPY) @@ -22,9 +26,6 @@ endif(NOT DEFINED MAKE) if(NOT DEFINED RUN_SHELL) set(RUN_SHELL "/bin/sh") endif(NOT DEFINED RUN_SHELL) -if(NOT DEFINED INSTALLER_SUFFIX) - set(INSTALLER_SUFFIX "*.sh") -endif(NOT DEFINED INSTALLER_SUFFIX) if(NOT DEFINED PROCESSORS) set(PROCESSORS 1) endif(NOT DEFINED PROCESSORS) @@ -77,13 +78,40 @@ configure_file(${SCRIPT_PATH}/release_cmake.sh.in ${SCRIPT_FILE} @ONLY) remote_command("run release_cmake-${HOST}.sh on server" "${RUN_SHELL}" ${SCRIPT_FILE}) -message("copy the .gz file back from the machine") -message("scp ${HOST}:${FINAL_PATH}/*.gz .") -execute_process(COMMAND scp ${HOST}:${FINAL_PATH}/*.gz . - RESULT_VARIABLE result) - -message("copy the ${INSTALLER_SUFFIX} file back from the machine") -message("scp ${HOST}:${FINAL_PATH}/${INSTALLER_SUFFIX} .") -execute_process(COMMAND scp ${HOST}:${FINAL_PATH}/${INSTALLER_SUFFIX} . - RESULT_VARIABLE result) - +# now figure out which types of packages were created +set(generators ${CPACK_BINARY_GENERATORS} ${CPACK_SOURCE_GENERATORS}) +separate_arguments(generators) +foreach(gen ${generators}) + if("${gen}" STREQUAL "TGZ") + set(SUFFIXES ${SUFFIXES} "*.tar.gz") + endif("${gen}" STREQUAL "TGZ") + if("${gen}" STREQUAL "STGZ") + set(SUFFIXES ${SUFFIXES} "*.sh") + endif("${gen}" STREQUAL "STGZ") + if("${gen}" STREQUAL "PackageMaker") + set(SUFFIXES ${SUFFIXES} "*.dmg") + endif("${gen}" STREQUAL "PackageMaker") + if("${gen}" STREQUAL "TBZ2") + set(SUFFIXES ${SUFFIXES} "*.tar.bz2") + endif("${gen}" STREQUAL "TBZ2") + if("${gen}" STREQUAL "TZ") + set(SUFFIXES ${SUFFIXES} "*.tar.Z") + endif("${gen}" STREQUAL "TZ") + if("${gen}" STREQUAL "ZIP") + set(SUFFIXES ${SUFFIXES} "*.zip") + endif("${gen}" STREQUAL "ZIP") + if("${gen}" STREQUAL "NSIS") + set(SUFFIXES ${SUFFIXES} "*.exe") + endif("${gen}" STREQUAL "NSIS") +endforeach(gen) +# copy all the files over from the remote machine +set(PROJECT_PREFIX cmake-) +foreach(suffix ${SUFFIXES}) + message("scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .") + execute_process(COMMAND + scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} . + RESULT_VARIABLE result) + if(${result} GREATER 0) + message("error getting file back scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .") + endif(${result} GREATER 0) +endforeach(suffix) |