ENH: better release scripts

This commit is contained in:
Ken Martin 2005-06-30 13:09:07 -04:00
parent cfda73f86a
commit 42d331b395
4 changed files with 55 additions and 35 deletions

View File

@ -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}"

View File

@ -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@
)

View File

@ -50,12 +50,20 @@ IF(WIN32)
${PROJECT_SOURCE_DIR}/Utilities/Release/${PROJECT_NAME}.nsi.in
${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)

View File

@ -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@