Utilities/Release: Fix nightly build upload

Since commit 71b14dcb (Utilities/Release: Do not upload doc staging
tarball, 2014-02-26) the prefix upload_release.cmake computes does not
match any files when used with -DVERSION=master as has been done for the
nightly binary builds.  Since the version is not actually 'master'
anyway, change the nightly binary upload logic to explicitly pass the
destination directory.  Do not pass any VERSION so the default is taken
and matches the binaries.
This commit is contained in:
Brad King 2014-03-06 09:31:26 -05:00
parent 4d67891a73
commit 25fb430e96
2 changed files with 4 additions and 5 deletions

View File

@ -575,7 +575,7 @@ if(BUILD_TESTING)
file(WRITE "${_TEST_DIR}/nightly-cmake.sh" file(WRITE "${_TEST_DIR}/nightly-cmake.sh"
"cd ${_TEST_DIR} "cd ${_TEST_DIR}
${CMake_BINARY_DIR}/bin/cmake -DCMAKE_CREATE_VERSION=nightly -P ${CMake_SOURCE_DIR}/Utilities/Release/${script} ${CMake_BINARY_DIR}/bin/cmake -DCMAKE_CREATE_VERSION=nightly -P ${CMake_SOURCE_DIR}/Utilities/Release/${script}
${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/Release/upload_release.cmake ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release/upload_release.cmake
") ")
add_test(${name} /bin/sh ${_TEST_DIR}/nightly-cmake.sh) add_test(${name} /bin/sh ${_TEST_DIR}/nightly-cmake.sh)
if(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY) if(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY)

View File

@ -5,16 +5,15 @@ endif()
if(NOT DEFINED PROJECT_PREFIX) if(NOT DEFINED PROJECT_PREFIX)
set(PROJECT_PREFIX cmake-${VERSION}) set(PROJECT_PREFIX cmake-${VERSION})
endif() endif()
set(dir "v${VERSION}") if(NOT DEFINED DIR)
if("${VERSION}" MATCHES "master") set(DIR "v${VERSION}")
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(SORT FILES)
list(REVERSE FILES) list(REVERSE FILES)
message("${FILES}") message("${FILES}")
set(UPLOAD_LOC set(UPLOAD_LOC
"kitware@www.cmake.org:/projects/FTP/pub/cmake/${dir}") "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})