markus / appCast.bat @ a39b5801
이력 | 보기 | 이력해설 | 다운로드 (1.76 KB)
1 | 9d5b4bc2 | taeseongkim | @echo off |
---|---|---|---|
2 | rem datetime stamp file name |
||
3 | |||
4 | @REM use FOR /F to 'break out' the components of %DATE% and %TIME%, assuming 'yyyy/mm/dd' format date i.e. |
||
5 | |||
6 | for /F "tokens=1-6* delims=.:-/ " %%i IN ("%DATE% %TIME%") DO Set "YYYY=%%i"& Set "MM=%%j"& Set "DD=%%k"& Set "HH=%%l"& Set "MI=%%m"& Set "SS=%%n" |
||
7 | |||
8 | @REM Switch the year and day if appropriate |
||
9 | |||
10 | IF NOT "X%DD:~2%" == "X" Set "YYYY=%DD%"& Set "DD=%YYYY%" |
||
11 | |||
12 | Set "TimeStamp=%YYYY%%MM%%DD%%HH%%MI%%SS%" |
||
13 | |||
14 | rem datetime stamp file name |
||
15 | |||
16 | rem version |
||
17 | |||
18 | set hostbaseUrl=%1 |
||
19 | set updateVersion=%2 |
||
20 | |||
21 | IF [%hostbaseUrl%]==[] goto :ERROR |
||
22 | if [%updateVersion%]==[] goto :ERROR |
||
23 | |||
24 | echo "Update Version %updateVersion%" |
||
25 | |||
26 | rem set APPCAST_PUBLISH_PATH=%cd%\publish\AppCast\%TimeStamp% |
||
27 | set APPCAST_PUBLISH_PATH=%cd%\publish\AppCast\ |
||
28 | SET MARKUS_PUBLISH_PATH=%cd%\Setup\Release_Default |
||
29 | |||
30 | echo "current : %current_dir%" |
||
31 | echo "APPCAST PATH : %APPCAST_PUBLISH_PATH%" |
||
32 | echo "AppCast Path : %current_dir:"=%\%APPCAST_PUBLISH_PATH:"=%" |
||
33 | echo "Publish Markus : %current_dir:"=%\%MARKUS_PUBLISH_PATH:"=%" |
||
34 | |||
35 | IF NOT EXIST %LocalAppData%\netsparkle\NetSparkle_Ed25519.pub ( |
||
36 | echo "generate-keys pass" |
||
37 | del %LocalAppData%\netsparkle\*.* /q |
||
38 | .\AppCast\generate_appcast.exe --key-path %APPCAST_PUBLISH_PATH%Keys |
||
39 | .\AppCast\generate_appcast.exe --generate-keys |
||
40 | ) |
||
41 | |||
42 | IF NOT EXIST %APPCAST_PUBLISH_PATH%\. MKDIR %APPCAST_PUBLISH_PATH% |
||
43 | |||
44 | .\AppCast\generate_appcast.exe -u %hostbaseUrl% -p %cd%\ChangeLog -a %APPCAST_PUBLISH_PATH% -e * -b %MARKUS_PUBLISH_PATH% -o windows -n Markus -x -v %updateVersion% |
||
45 | |||
46 | REM for /R %MARKUS_PUBLISH_PATH%\ %%f in (*.*) do ( |
||
47 | REM echo "signature %%f" |
||
48 | REM .\AppCast\generate_appcast.exe --generate-signature %%f |
||
49 | REM .\AppCast\generate_appcast.exe --verify %%f --signature %base_64_signature% |
||
50 | REM ) |
||
51 | |||
52 | :ERROR |
||
53 | echo arg1 arg2 exits |
||
54 | echo ex : appCast.bat http://hostname:port x.x.x |