tools: build.bat: skip choco build for non-WinFsp brands

This commit is contained in:
Bill Zissimopoulos 2021-04-13 14:38:51 -07:00
parent f8ee12f592
commit 3c7e712e57
No known key found for this signature in database
GPG Key ID: 3D4F95D52C7B3EA3
3 changed files with 8 additions and 8 deletions

View File

@ -105,13 +105,10 @@ if X%SignedPackage%==X (
:choco :choco
if not exist "build\%Configuration%\%MyProductFileName%-*.msi" (echo installer msi not found >&2 & exit /b 1) if not exist "build\%Configuration%\%MyProductFileName%-*.msi" (echo installer msi not found >&2 & exit /b 1)
if not X!MyProductName!==XWinFsp (echo skipping choco build for !MyProductName! >&2 & exit /b 0)
set Version= set Version=
for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do set Version=%%~nf for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do set Version=%%~nf
set Version=!Version:%MyProductFileName%-=! set Version=!Version:%MyProductFileName%-=!
set ProductStage=
for /f "delims=<> tokens=3" %%i in ('findstr "<MyProductStage>" version.properties') do (
set MyProductStage=%%i
)
set PackageVersion=!Version! set PackageVersion=!Version!
if not X!MyProductStage!==XGold ( if not X!MyProductStage!==XGold (
set PackageVersion=!Version!-pre set PackageVersion=!Version!-pre

View File

@ -105,13 +105,10 @@ if X%SignedPackage%==X (
:choco :choco
if not exist "build\%Configuration%\%MyProductFileName%-*.msi" (echo installer msi not found >&2 & exit /b 1) if not exist "build\%Configuration%\%MyProductFileName%-*.msi" (echo installer msi not found >&2 & exit /b 1)
if not X!MyProductName!==XWinFsp (echo skipping choco build for !MyProductName! >&2 & exit /b 0)
set Version= set Version=
for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do set Version=%%~nf for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do set Version=%%~nf
set Version=!Version:%MyProductFileName%-=! set Version=!Version:%MyProductFileName%-=!
set ProductStage=
for /f "delims=<> tokens=3" %%i in ('findstr "<MyProductStage>" version.properties') do (
set MyProductStage=%%i
)
set PackageVersion=!Version! set PackageVersion=!Version!
if not X!MyProductStage!==XGold ( if not X!MyProductStage!==XGold (
set PackageVersion=!Version!-pre set PackageVersion=!Version!-pre

View File

@ -10,6 +10,10 @@ for /F "tokens=2,3,4 delims=<>" %%a in (%~dp0..\build\VStudio\version.properties
set MyDescription=%%b set MyDescription=%%b
) else if "%%a"=="MyCompanyName" ( ) else if "%%a"=="MyCompanyName" (
set MyCompanyName=%%b set MyCompanyName=%%b
) else if "%%a"=="MyProductVersion" (
set MyProductVersion=%%b
) else if "%%a"=="MyProductStage" (
set MyProductStage=%%b
) )
) )
) )
@ -18,3 +22,5 @@ echo MyProductName=%MyProductName%
echo MyProductFileName=%MyProductFileName% echo MyProductFileName=%MyProductFileName%
echo MyDescription=%MyDescription% echo MyDescription=%MyDescription%
echo MyCompanyName=%MyCompanyName% echo MyCompanyName=%MyCompanyName%
echo MyProductVersion=%MyProductVersion%
echo MyProductStage=%MyProductStage%