From 329f0a64b02bb76a61744b4d03ea4de70fdde0b8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 11 Jul 2019 10:12:23 -0400 Subject: Utilities/Release: Replace batch scripts with individual scripts Provide a more granular per-platform workflow. --- Utilities/Release/create-cmake-release.cmake | 44 +++++++++------------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index b3cc352..0622ad8 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -5,30 +5,10 @@ endif() file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/logs) -set(RELEASE_SCRIPTS_BATCH_1 - win32_release.cmake # Windows x86 - osx_release.cmake # OS X x86_64 - linux64_release.cmake # Linux x86_64 -) - -set(RELEASE_SCRIPTS_BATCH_2 - win64_release.cmake # Windows x64 -) - -function(write_batch_shell_script filename) - set(scripts ${ARGN}) - set(i 0) - file(WRITE ${filename} "#!/bin/bash") - foreach(f ${scripts}) - math(EXPR x "420*(${i}/4)") - math(EXPR y "160*(${i}%4)") - file(APPEND ${filename} - " -\"${CMAKE_COMMAND}\" -DCMAKE_CREATE_VERSION=${CMAKE_CREATE_VERSION} -DCMAKE_DOC_TARBALL=\"${CMAKE_DOC_TARBALL}\" -P \"${CMAKE_ROOT}/Utilities/Release/${f}\" < /dev/null >& \"${CMAKE_CURRENT_SOURCE_DIR}/logs/${f}-${CMAKE_CREATE_VERSION}.log\" & -xterm -geometry 64x6+${x}+${y} -sb -sl 2000 -T ${f}-${CMAKE_CREATE_VERSION}.log -e tail -f \"${CMAKE_CURRENT_SOURCE_DIR}/logs/${f}-${CMAKE_CREATE_VERSION}.log\" & +function(write_rel_shell_script filename script) + file(WRITE ${filename} "#!/usr/bin/env bash +\"${CMAKE_COMMAND}\" -DCMAKE_CREATE_VERSION=${CMAKE_CREATE_VERSION} -DCMAKE_DOC_TARBALL=\"${CMAKE_DOC_TARBALL}\" -P \"${CMAKE_CURRENT_LIST_DIR}/${script}.cmake\" < /dev/null 2>&1 | tee \"${CMAKE_CURRENT_SOURCE_DIR}/logs/${script}-${CMAKE_CREATE_VERSION}.log\" ") - math(EXPR i "${i}+1") - endforeach() execute_process(COMMAND chmod a+x ${filename}) endfunction() @@ -65,12 +45,16 @@ echo 'Failed to create \${name}.tar.gz' endfunction() write_docs_shell_script("create-${CMAKE_CREATE_VERSION}-docs.sh") -write_batch_shell_script("create-${CMAKE_CREATE_VERSION}-batch1.sh" ${RELEASE_SCRIPTS_BATCH_1}) -write_batch_shell_script("create-${CMAKE_CREATE_VERSION}-batch2.sh" ${RELEASE_SCRIPTS_BATCH_2}) - -message("Run one at a time: - ./create-${CMAKE_CREATE_VERSION}-docs.sh && - ./create-${CMAKE_CREATE_VERSION}-batch1.sh && - ./create-${CMAKE_CREATE_VERSION}-batch2.sh && +write_rel_shell_script("create-${CMAKE_CREATE_VERSION}-linux64.sh" linux64_release) # Linux x86_64 +write_rel_shell_script("create-${CMAKE_CREATE_VERSION}-macos.sh" osx_release ) # macOS x86_64 +write_rel_shell_script("create-${CMAKE_CREATE_VERSION}-win64.sh" win64_release ) # Windows x64 +write_rel_shell_script("create-${CMAKE_CREATE_VERSION}-win32.sh" win32_release ) # Windows x86 + +message("Build docs first and then build for each platform: + ./create-${CMAKE_CREATE_VERSION}-docs.sh && + ./create-${CMAKE_CREATE_VERSION}-linux64.sh && + ./create-${CMAKE_CREATE_VERSION}-macos.sh && + ./create-${CMAKE_CREATE_VERSION}-win64.sh && + ./create-${CMAKE_CREATE_VERSION}-win32.sh && echo done ") -- cgit v0.12