tools: build-choco.bat

This commit is contained in:
Bill Zissimopoulos
2020-01-28 19:47:14 -08:00
parent 8301642e6b
commit 9e32fed598
2 changed files with 129 additions and 1 deletions

View File

@@ -14,6 +14,11 @@ set SignedPackage=
if not X%1==X set Configuration=%1
if not X%2==X set SignedPackage=%2
if X%~nx0==Xbuild-choco.bat (
cd %~dp0..\build\VStudio
goto :choco
)
call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
if not X%SignedPackage%==X (
@@ -83,9 +88,9 @@ for %%f in (build\%Configuration%\winfsp-*.msi) do (
if not %signfail%==0 echo SIGNING FAILED! The product has been successfully built, but not signed.
set Version=
for %%f in (build\%Configuration%\winfsp-*.msi) do set Version=%%~nf
set Version=!Version:winfsp-=!
if X%SignedPackage%==X (
pushd build\%Configuration%
powershell -command "Compress-Archive -Path winfsp-tests-*.exe,..\..\..\..\License.txt,..\..\..\..\tst\winfsp-tests\README.md -DestinationPath winfsp-tests-!Version!.zip"
@@ -93,6 +98,11 @@ if X%SignedPackage%==X (
popd
)
:choco
if not exist "build\%Configuration%\winfsp-*.msi" (echo installer msi not found >&2 & exit /b 1)
set Version=
for %%f in (build\%Configuration%\winfsp-*.msi) do set Version=%%~nf
set Version=!Version:winfsp-=!
where /q choco.exe
if %ERRORLEVEL% equ 0 (
copy ..\choco\* build\%Configuration%