source: other-projects/nightly-tasks/crons-and-scripts/windows/create-expeditee.bat@ 32407

Last change on this file since 32407 was 32407, checked in by ak19, 6 years ago

The Windows nightly and release binary generation scripts. Task scheduler task on Windows a.o.t. cron. The nightly task is called Nightly First Pass and has been exported from Windows Task Scheduler in xml format.

File size: 2.3 KB
Line 
1@echo off
2setlocal
3
4:: http://stackoverflow.com/questions/203090/how-to-get-current-datetime-on-windows-command-line-in-a-suitable-format-for-us
5for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%b-%%a)
6echo The current date is %mydate%
7
8
9:: currentdir (C:\Research\Nightly)
10set currentdir=%CD%
11
12:: Need to edit rke-setup.bat and fill it in with local env vars values
13if not exist %currentdir%\tools\expeditee-release-kits\rke-setup.bat (
14echo.
15echo *******************
16echo.
17echo First edit %currentdir%\tools\expeditee-release-kits\rke-setup.bat.in
18echo to generate %currentdir%\tools\expeditee-release-kits\rke-setup.bat
19echo.
20echo *******************
21echo.
22goto end
23)
24
25:: rke-setup.bat uses local paths, so cd into expeditee-release-kits first
26:: then call rke-setup.bat to source the environment vars it sets
27pushd %currentdir%\tools\expeditee-release-kits
28call rke-setup.bat
29if ERRORLEVEL 1 (
30 echo error level 1 or more
31 popd
32 exit /B 1
33)
34popd
35
36
37:: Make sure the expeditee folder and its rke-build.properties file exist
38:: Then run the 'rke' command from snapshots\expeditee
39pushd %currentdir%\snapshots
40::http://www.robvanderwoude.com/battech_ifexistfolder.php
41if exist expeditee\ echo Deleting snapshots\expeditee&& rmdir /s /q expeditee
42if not exist expeditee\ mkdir expeditee
43if not exist expeditee\rke-build.properties copy C:\Research\Nightly\tools\expeditee-release-kits\rke-build.properties.in expeditee\rke-build.properties
44pushd expeditee
45call rke
46
47:: Uploading
48mkdir uploads
49copy products\Expeditee-1%products_suffix%.exe uploads\Expeditee-1-%mydate%%uploads_suffix%.exe
50copy rke.out uploads\rke-%mydate%%os_suffix%-windows.out
51set PATH=C:\Windows\System32\linuxtools;C:\Program Files (x86)\PuTTY2;%PATH%
52:: Works from the cmd line:
53:: cd uploads && tar.exe -c * | plink.exe -T -i "C:\Research\Nightly\tools\keys\upload-expeditee.ppk" [email protected]
54
55:: The following setcmd ends up partially running the cmd and uploading everything in snapshots\expeditee onto the remote machine
56rem set upload_cmd=cd uploads && tar -c * | plink -T -i "C:\Research\Nightly\tools\keys\upload-expeditee.ppk" [email protected]
57rem echo %upload_cmd%
58cd uploads && tar -c * | plink -T -i "%identity_file%" [email protected]
59
60:end
61
62cd %currentdir%
63endlocal
64::exit
Note: See TracBrowser for help on using the repository browser.