diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-06-30 17:09:07 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-06-30 17:09:07 (GMT) |
commit | 42d331b3957104e776e91f38ee7ccb20f7ebcd1e (patch) | |
tree | c2b9de055d3ba3804b9250cc9eab152945f2134c /Utilities/Release | |
parent | cfda73f86ab0e4eb4f73ceaa48f53225b4054214 (diff) | |
download | CMake-42d331b3957104e776e91f38ee7ccb20f7ebcd1e.zip CMake-42d331b3957104e776e91f38ee7ccb20f7ebcd1e.tar.gz CMake-42d331b3957104e776e91f38ee7ccb20f7ebcd1e.tar.bz2 |
ENH: better release scripts
Diffstat (limited to 'Utilities/Release')
-rw-r--r-- | Utilities/Release/CMake.nsi.in | 2 | ||||
-rw-r--r-- | Utilities/Release/MakeRelease.cmake.in | 42 | ||||
-rw-r--r-- | Utilities/Release/Release.cmake | 16 | ||||
-rwxr-xr-x | Utilities/Release/Win32Release.sh.in | 30 |
4 files changed, 55 insertions, 35 deletions
diff --git a/Utilities/Release/CMake.nsi.in b/Utilities/Release/CMake.nsi.in index a41b084..0238e18 100644 --- a/Utilities/Release/CMake.nsi.in +++ b/Utilities/Release/CMake.nsi.in @@ -23,7 +23,7 @@ ;Name and file Name "CMake ${VERSION}" - OutFile "cmake-${VERSION}.${PATCH}-win32.exe" + OutFile "@PROJECT_BINARY_DIR@\cmake-${VERSION}.${PATCH}-win32.exe" ;Default installation folder InstallDir "$PROGRAMFILES\CMake ${VERSION}" diff --git a/Utilities/Release/MakeRelease.cmake.in b/Utilities/Release/MakeRelease.cmake.in new file mode 100644 index 0000000..4718ac9 --- /dev/null +++ b/Utilities/Release/MakeRelease.cmake.in @@ -0,0 +1,42 @@ +# this script is designed to be run from a UNIX like shell under Windows +# and has some hard coded assumptions. Do not just randomly run this script +# without looking it over first. + +# Release version number. +SET (TAG + "CMake-@CMake_VERSION_MAJOR@-@CMake_VERSION_MINOR@-@CMake_VERSION_PATCH@") +SET (VERSION + "@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@.@CMake_VERSION_PATCH@") + +SET (SCPID "kitware@public.kitware.com") + +# CVSROOT setting used to check out CMake. +SET (CVSROOT ":pserver:anoncvs@www.cmake.org:/cvsroot/CMake") + +# build the NSI +EXEC_PROGRAM("@NSIS_MAKENSIS@" + ARGS "@PROJECT_BINARY_DIR@/Utilities/Release/@PROJECT_NAME@.nsi" +) + +# copy the NSI to the FTP site +EXEC_PROGRAM(scp + ARGS cmake-${VERSION}-win32.exe + ${SCPID}:/projects/FTP/pub/cmake/v@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@ + ) + +# tag the tree +EXEC_PROGRAM(cvs "@PROJECT_SOURCE_DIR@" + ARGS tag -F ${TAG}) + +# build the winzip src file and copy it over +EXEC_PROGRAM(rm C:/ + ARGS -rf @PROJECT_NAME@ +) +EXEC_PROGRAM(cvs C:/ + ARGS -d ${CVSROOT} export -r ${TAG} @PROJECT_NAME@) +EXEC_PROGRAM("@WINZIP_WZZIP@" "C:/@PROJECT_NAME@" + ARGS -r -P cmake-${VERSION}.zip) +EXEC_PROGRAM(scp "C:/@PROJECT_NAME@" + ARGS cmake-${VERSION}.zip + ${SCPID}:/projects/FTP/pub/cmake/v@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@ + ) diff --git a/Utilities/Release/Release.cmake b/Utilities/Release/Release.cmake index 7f7ca86..dadec45 100644 --- a/Utilities/Release/Release.cmake +++ b/Utilities/Release/Release.cmake @@ -51,11 +51,19 @@ IF(WIN32) ${PROJECT_BINARY_DIR}/Utilities/Release/${PROJECT_NAME}.nsi IMMEDIATE @ONLY) CONFIGURE_FILE( - ${PROJECT_SOURCE_DIR}/Utilities/Release/Win32Release.sh.in - ${PROJECT_BINARY_DIR}/Utilities/Release/Win32Release.sh - IMMEDIATE @ONLY) - CONFIGURE_FILE( ${PROJECT_SOURCE_DIR}/Utilities/Release/cmake_release.sh.in ${PROJECT_BINARY_DIR}/Utilities/Release/cmake_release.sh IMMEDIATE @ONLY) + CONFIGURE_FILE( + ${PROJECT_SOURCE_DIR}/Utilities/Release/MakeRelease.cmake.in + ${PROJECT_BINARY_DIR}/Utilities/Release/MakeRelease.cmake + IMMEDIATE @ONLY) ENDIF(WIN32) + +IF (NSIS_MAKENSIS AND WINZIP_WZZIP) + # build the NSI + ADD_CUSTOM_TARGET( release + ${CMAKE_COMMAND} -P + ${PROJECT_BINARY_DIR}/Utilities/Release/MakeRelease.cmake + ) +ENDIF (NSIS_MAKENSIS AND WINZIP_WZZIP) diff --git a/Utilities/Release/Win32Release.sh.in b/Utilities/Release/Win32Release.sh.in deleted file mode 100755 index a3bde31..0000000 --- a/Utilities/Release/Win32Release.sh.in +++ /dev/null @@ -1,30 +0,0 @@ -# this script is designed to be run from a UNIX like shell under Windows -# and has some hard coded assumptions. Do not just randomly run this script -# without looking it over first. - -# Release version number. -TAG="CMake-@CMake_VERSION_MAJOR@-@CMake_VERSION_MINOR@-@CMake_VERSION_PATCH@" -VERSION="@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@.@CMake_VERSION_PATCH@" - -SCPID="kitware@public.kitware.com" - -# CVSROOT setting used to check out Cmake. -CVSROOT=":pserver:anoncvs@www.cmake.org:/cvsroot/CMake" - -# build the NSI -"@NSIS_MAKENSIS@" "@PROJECT_BINARY_DIR@/Utilities/Release/@PROJECT_NAME@.nsi" - -#scp cmake-${VERSION}-win32.exe ${SCPID}:/projects/FTP/pub/cmake/v@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@ - -# tag the tree -#cd "@PROJECT_SOURCE_DIR@" -#cvs tag -F ${TAG} - -# build the winzip src file -#cd C: -#rm -rf @PROJECT_NAME@ -#cvs -d ${CVSROOT} export -r ${TAG} @PROJECT_NAME@ - -#cd @PROJECT_NAME@ -#"@WINZIP_WZZIP@" -r -P cmake-${VERSION}.zip -#scp cmake-${VERSION}.zip ${SCPID}:/projects/FTP/pub/cmake/v@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@ |