ENH: change to script mode
This commit is contained in:
parent
68bac14403
commit
6b9f681f91
@ -43,62 +43,21 @@ macro(remote_command comment command)
|
|||||||
endif(${result} GREATER 0)
|
endif(${result} GREATER 0)
|
||||||
endmacro(remote_command)
|
endmacro(remote_command)
|
||||||
|
|
||||||
# remove and create a directory to work with
|
set(CMAKE_BACKWARDS_COMPATIBILITY 2.4)
|
||||||
remote_command(
|
configure_file(${SCRIPT_PATH}/release_cmake.sh.in release_cmake.sh)
|
||||||
"remove and create working directory ~/CMakeReleaseDirectory"
|
execute_process(COMMAND
|
||||||
"rm -rf ~/CMakeReleaseDirectory && mkdir ~/CMakeReleaseDirectory")
|
scp release_cmake.sh ${HOST}:release_cmake.sh
|
||||||
# create user make rule file
|
RESULT_VARIABLE result)
|
||||||
if(DEFINED USER_MAKE_RULE_FILE_CONTENTS)
|
if(${result} GREATER 0)
|
||||||
remote_command("Create ${USER_MAKE_RULE_FILE}"
|
message(FATAL_ERROR "Error scp release_cmake.sh to ${HOST}:release_cmake.sh")
|
||||||
"echo ${USER_MAKE_RULE_FILE_CONTENTS} > ${USER_MAKE_RULE_FILE}" )
|
endif(${result} GREATER 0)
|
||||||
endif(DEFINED USER_MAKE_RULE_FILE_CONTENTS)
|
remote_command("Run release script" "sh release_cmake.sh")
|
||||||
|
|
||||||
# create the build directory
|
|
||||||
remote_command(
|
|
||||||
"Create a directory to build in"
|
|
||||||
"rm -rf ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && mkdir ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build")
|
|
||||||
# set the initial cache
|
|
||||||
if(DEFINED INITIAL_CACHE)
|
|
||||||
remote_command("Create ${USER_MAKE_RULE_FILE}"
|
|
||||||
"echo \"${INITIAL_CACHE}\" > ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build/CMakeCache.txt" )
|
|
||||||
endif(DEFINED INITIAL_CACHE)
|
|
||||||
|
|
||||||
# login to cvs
|
|
||||||
remote_command(
|
|
||||||
"Login into cvs."
|
|
||||||
"${CVS_COMMAND} -d ${CVSROOT} login" "${SCRIPT_PATH}/cmake_login")
|
|
||||||
# checkout the source
|
|
||||||
remote_command(
|
|
||||||
"Checkout the source for ${CMAKE_VERSION}"
|
|
||||||
"cd ~/CMakeReleaseDirectory && ${CMAKE_CHECKOUT} -d ${CMAKE_VERSION} CMake")
|
|
||||||
# now bootstrap cmake
|
|
||||||
remote_command(
|
|
||||||
"Run cmake bootstrap --parallel=${PROCESSORS}"
|
|
||||||
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ../${CMAKE_VERSION}/bootstrap --parallel=${PROCESSORS}")
|
|
||||||
# build cmake
|
|
||||||
remote_command(
|
|
||||||
"Build cmake with ${MAKE}"
|
|
||||||
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ${MAKE}")
|
|
||||||
# build cmake
|
|
||||||
remote_command(
|
|
||||||
"Build cmake with ${MAKE}"
|
|
||||||
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ${MAKE}")
|
|
||||||
# run the tests
|
|
||||||
remote_command(
|
|
||||||
"Run cmake tests"
|
|
||||||
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ${MAKE} test")
|
|
||||||
|
|
||||||
# package cmake with self-extracting shell script
|
|
||||||
remote_command(
|
|
||||||
"Package cmake"
|
|
||||||
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ${MAKE} package")
|
|
||||||
# package cmake with a tar gz file
|
|
||||||
remote_command(
|
|
||||||
"Package cmake"
|
|
||||||
"cd ~/CMakeReleaseDirectory/${CMAKE_VERSION}-build && ./bin/cpack -G TGZ")
|
|
||||||
message("copy the .gz file back from the machine")
|
message("copy the .gz file back from the machine")
|
||||||
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz .
|
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/*.gz .
|
||||||
RESULT_VARIABLE result)
|
RESULT_VARIABLE result)
|
||||||
|
|
||||||
message("copy the ${INSTALLER_SUFFIX} file back from the machine")
|
message("copy the ${INSTALLER_SUFFIX} file back from the machine")
|
||||||
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/${INSTALLER_SUFFIX} .
|
execute_process(COMMAND scp ${HOST}:CMakeReleaseDirectory/${CMAKE_VERSION}-build/${INSTALLER_SUFFIX} .
|
||||||
RESULT_VARIABLE result)
|
RESULT_VARIABLE result)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user