https://github.com/Kitware/CMake
Revision 0a5dd3c700f1873be217707aa89a805d009bac3e authored by Sebastian Holtermann on 06 August 2016, 11:09:59 UTC, committed by Brad King on 10 August 2016, 17:21:33 UTC
The class generates a semi-unique (checksum based) pathless file name
from a full source file path.
1 parent 3a5f609
Raw File
Tip revision: 0a5dd3c700f1873be217707aa89a805d009bac3e authored by Sebastian Holtermann on 06 August 2016, 11:09:59 UTC
cmFilePathUuid: Add class to generate deterministic unique file names
Tip revision: 0a5dd3c
upload_release.cmake
set(CTEST_RUN_CURRENT_SCRIPT 0)
if(NOT VERSION)
 set(VERSION 3.6)
endif()
if(NOT DEFINED PROJECT_PREFIX)
  set(PROJECT_PREFIX cmake-${VERSION})
endif()
if(NOT DEFINED DIR)
  set(DIR "v${VERSION}")
endif()
file(GLOB FILES ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_PREFIX}*")
list(SORT FILES)
list(REVERSE FILES)
message("${FILES}")
set(UPLOAD_LOC
  "kitware@www.cmake.org:/projects/FTP/pub/cmake/${DIR}")
set(count 0)
foreach(file ${FILES})
  if(NOT IS_DIRECTORY ${file})
    message("upload ${file} ${UPLOAD_LOC}")
    execute_process(COMMAND
      scp ${file} ${UPLOAD_LOC}
      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()
if(${count} EQUAL 0)
   message(FATAL_ERROR "Error no files uploaded.")
endif()
back to top