diff options
author | David Cole <david.cole@kitware.com> | 2012-08-13 17:26:39 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-08-13 17:26:39 (GMT) |
commit | e85650909332f6ca84917e1b003192e6207ef304 (patch) | |
tree | dee5f8af1777cf0523831b5a15a2c1240631fb4b /Utilities | |
parent | bed44c2cc1d308166a7c00d5f1b6506ad118cd99 (diff) | |
parent | 214589b1f068800721c582b6983d718d5a66c04b (diff) | |
download | CMake-e85650909332f6ca84917e1b003192e6207ef304.zip CMake-e85650909332f6ca84917e1b003192e6207ef304.tar.gz CMake-e85650909332f6ca84917e1b003192e6207ef304.tar.bz2 |
Merge topic 'release-script-fixes'
214589b Add ability to run as a ctest -S script also
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/Release/upload_release.cmake | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake index dc6c78f..bd79296 100644 --- a/Utilities/Release/upload_release.cmake +++ b/Utilities/Release/upload_release.cmake @@ -1,4 +1,7 @@ -set(PROJECT_PREFIX cmake-) +set(CTEST_RUN_CURRENT_SCRIPT 0) +if(NOT DEFINED PROJECT_PREFIX) + set(PROJECT_PREFIX cmake-) +endif() if(NOT VERSION) set(VERSION 2.8) endif() @@ -18,11 +21,18 @@ foreach(file ${FILES}) message("upload ${file} ${UPLOAD_LOC}") execute_process(COMMAND scp ${file} ${UPLOAD_LOC} - RESULT_VARIABLE result) - math(EXPR count "${count} + 1") + RESULT_VARIABLE result) if("${result}" GREATER 0) message(FATAL_ERROR "failed to upload file to ${UPLOAD_LOC}") endif() + + # Pause to give each upload a distinct (to the nearest second) + # time stamp + if(COMMAND ctest_sleep) + ctest_sleep(2) + endif() + + math(EXPR count "${count} + 1") endif() endforeach(file) if(${count} EQUAL 0) |