Merge topic 'eliminate-cvs-from-release-scripts'

b43af94 CMake: eliminate use of cvs in the Release scripts
This commit is contained in:
Brad King 2011-06-07 14:06:21 -04:00 committed by CMake Topic Stage
commit 06296ca3fd
11 changed files with 45 additions and 41 deletions

View File

@ -1,28 +1,42 @@
if(NOT DEFINED CMAKE_CREATE_VERSION) if(NOT DEFINED CMAKE_CREATE_VERSION)
message(FATAL_ERROR "CMAKE_CREATE_VERSION not defined") set(CMAKE_CREATE_VERSION "release")
endif(NOT DEFINED CMAKE_CREATE_VERSION) message("Using default value of 'release' for CMAKE_CREATE_VERSION")
endif()
set(RELEASE_SCRIPTS file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/logs)
dashmacmini2_release.cmake # Mac Darwin universal
dashsun1_release.cmake # SunOS set(RELEASE_SCRIPTS_BATCH_1
# destiny_release.cmake # HPUX -- destiny is dead; long live destiny
magrathea_release.cmake # Linux
dash2win64_release.cmake # Windows dash2win64_release.cmake # Windows
# dash2win64_cygwin.cmake # Cygwin dashmacmini2_release.cmake # Mac Darwin universal
# blight_cygwin.cmake # Cygwin magrathea_release.cmake # Linux
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_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") set(RELEASE_SCRIPTS_BATCH_2
make_directory(${CMAKE_CURRENT_SOURCE_DIR}/logs) dash2win64_cygwin.cmake # Cygwin
)
foreach(f ${RELEASE_SCRIPTS}) function(write_batch_shell_script filename)
file(APPEND create-${CMAKE_CREATE_VERSION}.sh 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 & ${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&") 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&
endforeach(f) ")
execute_process(COMMAND chmod a+x create-${CMAKE_CREATE_VERSION}.sh) math(EXPR i "${i}+1")
message("Run ./create-${CMAKE_CREATE_VERSION}.sh") 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")

View File

@ -12,7 +12,6 @@ CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE
set(CXX g++) set(CXX g++)
set(CC gcc) set(CC gcc)
set(SCRIPT_NAME dash2win64cygwin) set(SCRIPT_NAME dash2win64cygwin)
set(GIT_COMMAND git)
set(GIT_EXTRA "git config core.autocrlf true") set(GIT_EXTRA "git config core.autocrlf true")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${path}/release_cmake.cmake) include(${path}/release_cmake.cmake)

View File

@ -15,6 +15,5 @@ BUILD_QtDialog:BOOL:=TRUE
QT_QMAKE_EXECUTABLE:FILEPATH=c:/Dashboards/Support/qt-build/Qt/bin/qmake.exe QT_QMAKE_EXECUTABLE:FILEPATH=c:/Dashboards/Support/qt-build/Qt/bin/qmake.exe
") ")
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
set(GIT_COMMAND git)
set(GIT_EXTRA "git config core.autocrlf true") set(GIT_EXTRA "git config core.autocrlf true")
include(${path}/release_cmake.cmake) include(${path}/release_cmake.cmake)

View File

@ -15,6 +15,5 @@ CPACK_SYSTEM_NAME:STRING=Darwin-universal
BUILD_QtDialog:BOOL:=TRUE BUILD_QtDialog:BOOL:=TRUE
QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Software/QtBinUniversal/bin/qmake 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) get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${path}/release_cmake.cmake) include(${path}/release_cmake.cmake)

View File

@ -1,4 +1,3 @@
set(CVS_COMMAND "/home/whoffman/bin/cvs")
set(CMAKE_RELEASE_DIRECTORY "/home/whoffman/CMakeReleaseDirectory64") set(CMAKE_RELEASE_DIRECTORY "/home/whoffman/CMakeReleaseDirectory64")
set(PROCESSORS 2) set(PROCESSORS 2)
set(CFLAGS "-64") set(CFLAGS "-64")

View File

@ -1,4 +1,3 @@
set(CVS_COMMAND "/home/whoffman/bin/cvs")
set(CMAKE_RELEASE_DIRECTORY "/home/whoffman/CMakeReleaseDirectory") set(CMAKE_RELEASE_DIRECTORY "/home/whoffman/CMakeReleaseDirectory")
set(PROCESSORS 2) set(PROCESSORS 2)
set(HOST sgi) set(HOST sgi)

View File

@ -3,7 +3,6 @@ set(HOST magrathea)
set(MAKE_PROGRAM "make") set(MAKE_PROGRAM "make")
set(CC gcc332s) set(CC gcc332s)
set(CXX c++332s) set(CXX c++332s)
set(GIT_COMMAND /home/kitware/.userroot/git/bin/git)
set(INITIAL_CACHE " set(INITIAL_CACHE "
CMAKE_BUILD_TYPE:STRING=Release CMAKE_BUILD_TYPE:STRING=Release
CURSES_LIBRARY:FILEPATH=/usr/i686-gcc-332s/lib/libncurses.a CURSES_LIBRARY:FILEPATH=/usr/i686-gcc-332s/lib/libncurses.a

View File

@ -1,5 +1,3 @@
set(CVSROOT ":pserver:anonymous@cmake.org:/cmake.git")
get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH) get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
# default to self extracting tgz, tgz, and tar.Z # default to self extracting tgz, tgz, and tar.Z
@ -30,17 +28,15 @@ endif(NOT DEFINED PROCESSORS)
if(NOT DEFINED CMAKE_CREATE_VERSION) if(NOT DEFINED CMAKE_CREATE_VERSION)
message(FATAL_ERROR "CMAKE_CREATE_VERSION not defined") message(FATAL_ERROR "CMAKE_CREATE_VERSION not defined")
endif(NOT DEFINED CMAKE_CREATE_VERSION) endif(NOT DEFINED CMAKE_CREATE_VERSION)
if(NOT DEFINED CVS_COMMAND) if(NOT DEFINED GIT_COMMAND)
set(CVS_COMMAND cvs) set(GIT_COMMAND git)
endif(NOT DEFINED CVS_COMMAND) endif()
if(${CMAKE_CREATE_VERSION} MATCHES "^(release|maint|next|nightly)$") if(${CMAKE_CREATE_VERSION} MATCHES "^(release|maint|next|nightly)$")
set(GIT_BRANCH origin/${CMAKE_CREATE_VERSION}) set(GIT_BRANCH origin/${CMAKE_CREATE_VERSION})
else() else()
set(GIT_BRANCH ${CMAKE_CREATE_VERSION}) set(GIT_BRANCH ${CMAKE_CREATE_VERSION})
endif() endif()
set( CMAKE_CHECKOUT "${CVS_COMMAND} -q -d ${CVSROOT} co -d ${CMAKE_CREATE_VERSION} ${CMAKE_CREATE_VERSION}")
if(NOT DEFINED FINAL_PATH ) if(NOT DEFINED FINAL_PATH )
set(FINAL_PATH ${CMAKE_RELEASE_DIRECTORY}/${CMAKE_CREATE_VERSION}-build) set(FINAL_PATH ${CMAKE_RELEASE_DIRECTORY}/${CMAKE_CREATE_VERSION}-build)

View File

@ -93,10 +93,8 @@ if [ ! -z "@GIT_COMMAND@" ]; then
check_exit_value $? "git checkout" || exit 1 check_exit_value $? "git checkout" || exit 1
cd .. cd ..
else else
# for CVS just run the CMAKE_CHECKOUT command as set echo GIT_COMMAND does not exist
# in release_cmake.cmake exit 1
@CMAKE_CHECKOUT@
check_exit_value $? "CVS Checkout cmake source" || exit 1
fi fi
cd @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build cd @CMAKE_RELEASE_DIRECTORY@/@CMAKE_CREATE_VERSION@-build

View File

@ -2,13 +2,16 @@ set(PROJECT_PREFIX cmake-)
if(NOT VERSION) if(NOT VERSION)
set(VERSION 2.8) set(VERSION 2.8)
endif() endif()
set(dir "v${VERSION}")
if("${VERSION}" MATCHES "master") if("${VERSION}" MATCHES "master")
set(VERSION CVS) set(dir "dev")
endif() endif()
file(GLOB FILES ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_PREFIX}*") file(GLOB FILES ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_PREFIX}*")
list(SORT FILES)
list(REVERSE FILES)
message("${FILES}") message("${FILES}")
set(UPLOAD_LOC 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) set(count 0)
foreach(file ${FILES}) foreach(file ${FILES})
if(NOT IS_DIRECTORY ${file}) if(NOT IS_DIRECTORY ${file})
@ -19,8 +22,8 @@ foreach(file ${FILES})
math(EXPR count "${count} + 1") math(EXPR count "${count} + 1")
if("${result}" GREATER 0) if("${result}" GREATER 0)
message(FATAL_ERROR "failed to upload file to ${UPLOAD_LOC}") message(FATAL_ERROR "failed to upload file to ${UPLOAD_LOC}")
endif("${result}" GREATER 0) endif()
endif(NOT IS_DIRECTORY ${file}) endif()
endforeach(file) endforeach(file)
if(${count} EQUAL 0) if(${count} EQUAL 0)
message(FATAL_ERROR "Error no files uploaded.") message(FATAL_ERROR "Error no files uploaded.")

View File

@ -1,7 +1,6 @@
set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory") set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory")
set(FINAL_PATH /u/noibm34/cmake-release) set(FINAL_PATH /u/noibm34/cmake-release)
set(PROCESSORS 2) set(PROCESSORS 2)
set(CVS_COMMAND /vol/local/bin/cvs)
set(HOST "sshserv.centers.ihost.com") set(HOST "sshserv.centers.ihost.com")
set(EXTRA_HOP "rsh p90n03") set(EXTRA_HOP "rsh p90n03")
set(MAKE_PROGRAM "make") set(MAKE_PROGRAM "make")