cd d:\scratch\build\master ..\release test {endterm} + +{subsection: build_workspace.bat} +This script copies a SHA from the current git repository to submit-3.batlab.org and submits it as a workspace build. This script depends on a shell script in ~johnkn/workspace on submit-3. arguments are <sha1>|index [<description> [all|win|win+|warn]] +{file: build_workspace.bat} +@echo off +@setlocal +if not exist nmi_tools goto usage + +if "%1"=="" goto usage +if "%1"=="-h" goto usage +if "%1"=="-help" goto usage +if "%1"=="/help" goto usage + +set sha=%1 +shift +if "%sha%"=="index" ( + for /F %%I in ('git write-tree') do ( + set sha=%%I + ) +) + +set submit=submit-3.batlab.org +set tar=git archive %sha% +set platforms=all + +set dir=wk%RANDOM% +set dir=%dir: =% +set arg1=%~1 +if NOT "%arg1:~0,1%" == "-" ( + set desc=%arg1: =_% + set dir=%dir%%arg1:~0,6% + shift +) +set desc=%desc: =% + +if NOT "%1"=="" set platforms=%1 + +@echo on +%tar% | plink -2 -i %USERPROFILE%\keys\putty.ppk -l %USERNAME% %submit% cd workspace ; mkdir %dir% ; cd %dir% ; tar xf - ; ../build_workspace %desc% %platforms% +@echo off +goto :EOF + +:: + + +:usage +@echo This script must be run from the CONDOR_SRC directory +@echo Usage: %0 sha1 [description] [all ^| win ^| win+ ^| warn] +@echo. send the given sha1 or branch to NMI submit machine as ~/workspace/wk^<rand^> +@echo. and then run ~/workspace/build_workspace to build it. +@echo. if sha1 is index, then git write-tree is used to generate the sha1 +{endfile} +Example +{term} +copy build_workspace.bat d:\scratch\condor +cd d:\scratch\condor\master +..\build_workspace index description all +{endterm}