@@ -9,6 +9,8 @@ set USER=
99set TARGET =
1010set DRYRUN = false
1111set NOGPG =
12+ set PURGE_OPTION = /p:Purge=true
13+ set NOTEST =
1214
1315:CheckOpts
1416if " %1 " EQU " -h" goto Help
@@ -19,7 +21,11 @@ if "%1" EQU "--user" (set USER=%~2) && shift && shift && goto CheckOpts
1921if " %1 " EQU " -t" (set TARGET=%~2 ) && shift && shift && goto CheckOpts
2022if " %1 " EQU " --target" (set TARGET=%~2 ) && shift && shift && goto CheckOpts
2123if " %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
2329
2430if not defined PLINK where plink > " %TEMP% \plink.loc" 2 > nul && set /P PLINK = < " %TEMP% \plink.loc" & del " %TEMP% \plink.loc"
2531if 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%
3541
3642if defined NOGPG (
3743 set GPG =
38- echo Skipping GPG signature generation because of --no -gpg
44+ echo Skipping GPG signature generation because of --skip -gpg
3945) else (
4046 if not defined GPG where gpg2 > " %TEMP% \gpg.loc" 2 > nul && set /P GPG = < " %TEMP% \gpg.loc" & del " %TEMP% \gpg.loc"
4147 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 (
4551
4652call " %PCBUILD% env.bat" > nul 2 > nul
4753pushd " %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+ )
5060msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x86
5161msbuild /v:m /nologo uploadrelease.proj /t:ShowHashes /p:Platform=x64 /p:IncludeDoc=false
5262popd
@@ -55,9 +65,12 @@ exit /B 0
5565:Help
5666echo uploadrelease.bat --host HOST --user USERNAME [--target TARGET] [--dry-run] [-h]
5767echo .
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
6376echo .
0 commit comments