@@ -9,6 +9,8 @@ set USER=
9
9
set TARGET =
10
10
set DRYRUN = false
11
11
set NOGPG =
12
+ set PURGE_OPTION = /p:Purge=true
13
+ set NOTEST =
12
14
13
15
:CheckOpts
14
16
if " %1 " EQU " -h" goto Help
@@ -19,7 +21,11 @@ if "%1" EQU "--user" (set USER=%~2) && shift && shift && goto CheckOpts
19
21
if " %1 " EQU " -t" (set TARGET=%~2 ) && shift && shift && goto CheckOpts
20
22
if " %1 " EQU " --target" (set TARGET=%~2 ) && shift && shift && goto CheckOpts
21
23
if " %1 " EQU " --dry-run" (set DRYRUN=true) && shift && goto CheckOpts
22
- if " %1 " EQU " --no-gpg" (set NOGPG=true) && shift && goto CheckOpts
24
+ if " %1 " EQU " --skip-gpg" (set NOGPG=true) && shift && goto CheckOpts
25
+ if " %1 " EQU " --skip-purge" (set PURGE_OPTION=) && shift && godo CheckOpts
26
+ if " %1 " EQU " --skip-test" (set NOTEST=true) && shift && godo CheckOpts
27
+ if " %1 " EQU " -T" (set NOTEST=true) && shift && godo CheckOpts
28
+ if " %1 " NEQ " " echo Unexpected argument " %1 " & exit /B 1
23
29
24
30
if not defined PLINK where plink > " %TEMP% \plink.loc" 2 > nul && set /P PLINK = < " %TEMP% \plink.loc" & del " %TEMP% \plink.loc"
25
31
if not defined PLINK where /R " %ProgramFiles(x86)% \PuTTY" plink > " %TEMP% \plink.loc" 2 > nul && set /P PLINK = < " %TEMP% \plink.loc" & del " %TEMP% \plink.loc"
@@ -35,7 +41,7 @@ echo Found pscp.exe at %PSCP%
35
41
36
42
if defined NOGPG (
37
43
set GPG =
38
- echo Skipping GPG signature generation because of --no -gpg
44
+ echo Skipping GPG signature generation because of --skip -gpg
39
45
) else (
40
46
if not defined GPG where gpg2 > " %TEMP% \gpg.loc" 2 > nul && set /P GPG = < " %TEMP% \gpg.loc" & del " %TEMP% \gpg.loc"
41
47
if not defined GPG where /R " %PCBUILD% ..\externals\windows-installer" gpg2 > " %TEMP% \gpg.loc" 2 > nul && set /P GPG = < " %TEMP% \gpg.loc" & del " %TEMP% \gpg.loc"
@@ -45,8 +51,12 @@ if defined NOGPG (
45
51
46
52
call " %PCBUILD% env.bat" > nul 2 > nul
47
53
pushd " %D% "
48
- msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86
49
- msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false
54
+ msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x86 %PURGE_OPTION%
55
+ msbuild /v:m /nologo uploadrelease.proj /t:Upload /p:Platform=x64 /p:IncludeDoc=false %PURGE_OPTION%
56
+ if not defined NOTEST (
57
+ msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x86
58
+ msbuild /v:m /nologo uploadrelease.proj /t:Test /p:Platform=x64
59
+ )
50
60
msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x86
51
61
msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x64 /p:IncludeDoc=false
52
62
popd
@@ -55,9 +65,12 @@ exit /B 0
55
65
:Help
56
66
echo uploadrelease.bat --host HOST --user USERNAME [--target TARGET] [--dry-run] [-h]
57
67
echo .
58
- echo --host (-o) Specify the upload host (required)
59
- echo --user (-u) Specify the user on the host (required)
60
- echo --target (-t) Specify the target directory on the host
61
- echo --dry-run Display commands and filenames without executing them
62
- echo -h Display this help information
68
+ echo --host (-o) Specify the upload host (required)
69
+ echo --user (-u) Specify the user on the host (required)
70
+ echo --target (-t) Specify the target directory on the host
71
+ echo --dry-run Display commands and filenames without executing them
72
+ echo --skip-gpg Does not generate GPG signatures before uploading
73
+ echo --skip-purge Does not perform CDN purge after uploading
74
+ echo --skip-test (-T) Does not perform post-upload tests
75
+ echo -h Display this help information
63
76
echo .
0 commit comments