diff options
author | David Cole <david.cole@kitware.com> | 2011-06-02 02:32:42 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-06-02 18:36:14 (GMT) |
commit | b43af94af1c3f80237fd9889bd5a48e02e279f17 (patch) | |
tree | 94af7860b77c56a22488335ce7d2d63000176830 /Utilities/Release | |
parent | 8af1eaf499cb539719fa1698ea3031a70a861728 (diff) | |
download | CMake-b43af94af1c3f80237fd9889bd5a48e02e279f17.zip CMake-b43af94af1c3f80237fd9889bd5a48e02e279f17.tar.gz CMake-b43af94af1c3f80237fd9889bd5a48e02e279f17.tar.bz2 |
CMake: eliminate use of cvs in the Release scripts
Set GIT_COMMAND to "git" -- each machine involved in building
the CMake release binaries has the right "git" in the PATH.
Separate the release scripts into two batches so we can build
multiple releases on the same machine, in serial, if necessary.
We currnetly do this with the Windows and Cygwin release
binaries on dash2win64.
Sort the files to be uploaded, so that sorting them by modification
time (file copy / upload time) is equivalent to sorting them
alphabetically.
Diffstat (limited to 'Utilities/Release')
-rw-r--r-- | Utilities/Release/create-cmake-release.cmake | 50 | ||||
-rw-r--r-- | Utilities/Release/dash2win64_cygwin.cmake | 1 | ||||
-rw-r--r-- | Utilities/Release/dash2win64_release.cmake | 1 | ||||
-rw-r--r-- | Utilities/Release/dashmacmini2_release.cmake | 1 | ||||
-rw-r--r-- | Utilities/Release/ferrari_sgi64_release.cmake | 1 | ||||
-rw-r--r-- | Utilities/Release/ferrari_sgi_release.cmake | 1 | ||||
-rw-r--r-- | Utilities/Release/magrathea_release.cmake | 1 | ||||
-rw-r--r-- | Utilities/Release/release_cmake.cmake | 10 | ||||
-rwxr-xr-x | Utilities/Release/release_cmake.sh.in | 6 | ||||
-rw-r--r-- | Utilities/Release/upload_release.cmake | 11 | ||||
-rw-r--r-- | Utilities/Release/v20n250_aix_release.cmake | 1 |
11 files changed, 44 insertions, 40 deletions
diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index fd91665..75b0061 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -1,28 +1,42 @@ if(NOT DEFINED CMAKE_CREATE_VERSION) - message(FATAL_ERROR "CMAKE_CREATE_VERSION not defined") -endif(NOT DEFINED CMAKE_CREATE_VERSION) + set(CMAKE_CREATE_VERSION "release") + message("Using default value of 'release' for CMAKE_CREATE_VERSION") +endif() -set(RELEASE_SCRIPTS +file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/logs) + +set(RELEASE_SCRIPTS_BATCH_1 + dash2win64_release.cmake # Windows dashmacmini2_release.cmake # Mac Darwin universal - dashsun1_release.cmake # SunOS -# destiny_release.cmake # HPUX -- destiny is dead; long live destiny magrathea_release.cmake # Linux - dash2win64_release.cmake # Windows -# dash2win64_cygwin.cmake # Cygwin -# blight_cygwin.cmake # Cygwin - v20n250_aix_release.cmake # AIX 5.3 + dashsun1_release.cmake # SunOS + v20n250_aix_release.cmake # AIX 5.3 ferrari_sgi64_release.cmake # IRIX 64 - ferrari_sgi_release.cmake # IRIX 64 + ferrari_sgi_release.cmake # IRIX ) -file(WRITE create-${CMAKE_CREATE_VERSION}.sh "#!/bin/bash") -make_directory(${CMAKE_CURRENT_SOURCE_DIR}/logs) +set(RELEASE_SCRIPTS_BATCH_2 + dash2win64_cygwin.cmake # Cygwin +) -foreach(f ${RELEASE_SCRIPTS}) - file(APPEND create-${CMAKE_CREATE_VERSION}.sh +function(write_batch_shell_script filename) + set(scripts ${ARGN}) + set(i 0) + file(WRITE ${filename} "#!/bin/bash") + foreach(f ${scripts}) + math(EXPR x "420*(${i}/4)") + math(EXPR y "160*(${i}%4)") + file(APPEND ${filename} " ${CMAKE_COMMAND} -DCMAKE_CREATE_VERSION=${CMAKE_CREATE_VERSION} -P ${CMAKE_ROOT}/Utilities/Release/${f} < /dev/null >& ${CMAKE_CURRENT_SOURCE_DIR}/logs/${f}-${CMAKE_CREATE_VERSION}.log & - xterm -geometry 80x10 -sb -sl 2000 -T ${f}-${CMAKE_CREATE_VERSION}.log -e tail -f ${CMAKE_CURRENT_SOURCE_DIR}/logs/${f}-${CMAKE_CREATE_VERSION}.log&") -endforeach(f) -execute_process(COMMAND chmod a+x create-${CMAKE_CREATE_VERSION}.sh) -message("Run ./create-${CMAKE_CREATE_VERSION}.sh") +xterm -geometry 64x6+${x}+${y} -sb -sl 2000 -T ${f}-${CMAKE_CREATE_VERSION}.log -e tail -f ${CMAKE_CURRENT_SOURCE_DIR}/logs/${f}-${CMAKE_CREATE_VERSION}.log& +") + math(EXPR i "${i}+1") + endforeach(f) + execute_process(COMMAND chmod a+x ${filename}) +endfunction() + +write_batch_shell_script("create-${CMAKE_CREATE_VERSION}-batch1.sh" ${RELEASE_SCRIPTS_BATCH_1}) +write_batch_shell_script("create-${CMAKE_CREATE_VERSION}-batch2.sh" ${RELEASE_SCRIPTS_BATCH_2}) + +message("Run ./create-${CMAKE_CREATE_VERSION}-batch1.sh, then after all those builds complete, run ./create-${CMAKE_CREATE_VERSION}-batch2.sh") diff --git a/Utilities/Release/dash2win64_cygwin.cmake b/Utilities/Release/dash2win64_cygwin.cmake index 64099a9..da66002 100644 --- a/Utilities/Release/dash2win64_cygwin.cmake +++ b/Utilities/Release/dash2win64_cygwin.cmake @@ -12,7 +12,6 @@ CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE set(CXX g++) set(CC gcc) set(SCRIPT_NAME dash2win64cygwin) -set(GIT_COMMAND git) set(GIT_EXTRA "git config core.autocrlf true") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/dash2win64_release.cmake b/Utilities/Release/dash2win64_release.cmake index 94decdd..fb82de0 100644 --- a/Utilities/Release/dash2win64_release.cmake +++ b/Utilities/Release/dash2win64_release.cmake @@ -15,6 +15,5 @@ BUILD_QtDialog:BOOL:=TRUE QT_QMAKE_EXECUTABLE:FILEPATH=c:/Dashboards/Support/qt-build/Qt/bin/qmake.exe ") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -set(GIT_COMMAND git) set(GIT_EXTRA "git config core.autocrlf true") include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/dashmacmini2_release.cmake b/Utilities/Release/dashmacmini2_release.cmake index 6deeb41..d117014 100644 --- a/Utilities/Release/dashmacmini2_release.cmake +++ b/Utilities/Release/dashmacmini2_release.cmake @@ -15,6 +15,5 @@ CPACK_SYSTEM_NAME:STRING=Darwin-universal BUILD_QtDialog:BOOL:=TRUE QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Software/QtBinUniversal/bin/qmake ") -set(GIT_COMMAND /opt/local/bin/git) get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/ferrari_sgi64_release.cmake b/Utilities/Release/ferrari_sgi64_release.cmake index 770c7e8..4425f05 100644 --- a/Utilities/Release/ferrari_sgi64_release.cmake +++ b/Utilities/Release/ferrari_sgi64_release.cmake @@ -1,4 +1,3 @@ -set(CVS_COMMAND "/home/whoffman/bin/cvs") set(CMAKE_RELEASE_DIRECTORY "/home/whoffman/CMakeReleaseDirectory64") set(PROCESSORS 2) set(CFLAGS "-64") diff --git a/Utilities/Release/ferrari_sgi_release.cmake b/Utilities/Release/ferrari_sgi_release.cmake index dd3c624..ee5121a 100644 --- a/Utilities/Release/ferrari_sgi_release.cmake +++ b/Utilities/Release/ferrari_sgi_release.cmake @@ -1,4 +1,3 @@ -set(CVS_COMMAND "/home/whoffman/bin/cvs") set(CMAKE_RELEASE_DIRECTORY "/home/whoffman/CMakeReleaseDirectory") set(PROCESSORS 2) set(HOST sgi) diff --git a/Utilities/Release/magrathea_release.cmake b/Utilities/Release/magrathea_release.cmake index a348235..549460e 100644 --- a/Utilities/Release/magrathea_release.cmake +++ b/Utilities/Release/magrathea_release.cmake @@ -3,7 +3,6 @@ set(HOST magrathea) set(MAKE_PROGRAM "make") set(CC gcc332s) set(CXX c++332s) -set(GIT_COMMAND /home/kitware/.userroot/git/bin/git) set(INITIAL_CACHE " CMAKE_BUILD_TYPE:STRING=Release CURSES_LIBRARY:FILEPATH=/usr/i686-gcc-332s/lib/libncurses.a diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 939d9dc..0c9b3f9 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -1,5 +1,3 @@ -set(CVSROOT ":pserver:anonymous@cmake.org:/cmake.git") - get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH) # default to self extracting tgz, tgz, and tar.Z @@ -30,17 +28,15 @@ endif(NOT DEFINED PROCESSORS) if(NOT DEFINED CMAKE_CREATE_VERSION) message(FATAL_ERROR "CMAKE_CREATE_VERSION not defined") endif(NOT DEFINED CMAKE_CREATE_VERSION) -if(NOT DEFINED CVS_COMMAND) - set(CVS_COMMAND cvs) -endif(NOT DEFINED CVS_COMMAND) +if(NOT DEFINED GIT_COMMAND) + set(GIT_COMMAND git) +endif() if(${CMAKE_CREATE_VERSION} MATCHES "^(release|maint|next|nightly)$") set(GIT_BRANCH origin/${CMAKE_CREATE_VERSION}) else() set(GIT_BRANCH ${CMAKE_CREATE_VERSION}) endif() -set( CMAKE_CHECKOUT "${CVS_COMMAND} -q -d ${CVSROOT} co -d ${CMAKE_CREATE_VERSION} ${CMAKE_CREATE_VERSION}") - if(NOT DEFINED FINAL_PATH ) set(FINAL_PATH ${CMAKE_RELEASE_DIRECTORY}/${CMAKE_CREATE_VERSION}-build) diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in index 8455e92..50882c5 100755 --- a/Utilities/Release/release_cmake.sh.in +++ b/Utilities/Release/release_cmake.sh.in @@ -93,10 +93,8 @@ if [ ! -z "@GIT_COMMAND@" ]; then check_exit_value $? "git checkout" || exit 1 cd .. else - # for CVS just run the CMAKE_CHECKOUT command as set - # in release_cmake.cmake - @CMAKE_CHECKOUT@ - check_exit_value $? "CVS Checkout cmake source" || exit 1 + echo GIT_COMMAND does not exist + exit 1 fi cd @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake index b57853c..dc6c78f 100644 --- a/Utilities/Release/upload_release.cmake +++ b/Utilities/Release/upload_release.cmake @@ -2,13 +2,16 @@ set(PROJECT_PREFIX cmake-) if(NOT VERSION) set(VERSION 2.8) endif() +set(dir "v${VERSION}") if("${VERSION}" MATCHES "master") - set(VERSION CVS) + set(dir "dev") endif() file(GLOB FILES ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_PREFIX}*") +list(SORT FILES) +list(REVERSE FILES) message("${FILES}") set(UPLOAD_LOC - "kitware@www.cmake.org:/projects/FTP/pub/cmake/v${VERSION}") + "kitware@www.cmake.org:/projects/FTP/pub/cmake/${dir}") set(count 0) foreach(file ${FILES}) if(NOT IS_DIRECTORY ${file}) @@ -19,8 +22,8 @@ foreach(file ${FILES}) math(EXPR count "${count} + 1") if("${result}" GREATER 0) message(FATAL_ERROR "failed to upload file to ${UPLOAD_LOC}") - endif("${result}" GREATER 0) - endif(NOT IS_DIRECTORY ${file}) + endif() + endif() endforeach(file) if(${count} EQUAL 0) message(FATAL_ERROR "Error no files uploaded.") diff --git a/Utilities/Release/v20n250_aix_release.cmake b/Utilities/Release/v20n250_aix_release.cmake index 7a5c8b9..53c34d7 100644 --- a/Utilities/Release/v20n250_aix_release.cmake +++ b/Utilities/Release/v20n250_aix_release.cmake @@ -1,7 +1,6 @@ set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory") set(FINAL_PATH /u/noibm34/cmake-release) set(PROCESSORS 2) -set(CVS_COMMAND /vol/local/bin/cvs) set(HOST "sshserv.centers.ihost.com") set(EXTRA_HOP "rsh p90n03") set(MAKE_PROGRAM "make") |