tools: build.bat,make-release.ps1: accommodate winfsp.net.nupkg

This commit is contained in:
Bill Zissimopoulos 2022-11-29 21:13:13 +00:00
parent 0488451c3d
commit 6846508631
2 changed files with 13 additions and 4 deletions

View File

@ -43,8 +43,11 @@ call "%~dp0vcvarsall.bat" x64
if not X%SignedPackage%==X ( if not X%SignedPackage%==X (
if not exist "%~dp0..\build\VStudio\build\%Configuration%\%MyProductFileName%-*.msi" (echo previous build not found >&2 & exit /b 1) if not exist "%~dp0..\build\VStudio\build\%Configuration%\%MyProductFileName%-*.msi" (echo previous build not found >&2 & exit /b 1)
if not exist "%SignedPackage%" (echo signed package not found >&2 & exit /b 1) if not exist "%SignedPackage%" (echo signed package not found >&2 & exit /b 1)
set Version=
for %%f in (build\%Configuration%\%MyProductFileName%-*.msi) do set Version=%%~nf
set Version=!Version:%MyProductFileName%-=!
del "%~dp0..\build\VStudio\build\%Configuration%\%MyProductFileName%-*.msi" del "%~dp0..\build\VStudio\build\%Configuration%\%MyProductFileName%-*.msi"
if exist "%~dp0..\build\VStudio\build\%Configuration%\winfsp.*.nupkg" del "%~dp0..\build\VStudio\build\%Configuration%\winfsp.*.nupkg" if exist "%~dp0..\build\VStudio\build\%Configuration%\winfsp.!Version!.nupkg" del "%~dp0..\build\VStudio\build\%Configuration%\winfsp.!Version!.nupkg"
for /R "%SignedPackage%" %%f in (*.sys) do ( for /R "%SignedPackage%" %%f in (*.sys) do (
copy "%%f" "%~dp0..\build\VStudio\build\%Configuration%" >nul copy "%%f" "%~dp0..\build\VStudio\build\%Configuration%" >nul
) )

View File

@ -161,9 +161,15 @@ function Check-Assets {
exit 1 exit 1
} }
# check winfsp.net.nupkg
if (!(Test-Path "$ProjectRoot\build\VStudio\build\Release\winfsp.net.*.nupkg" -ErrorAction SilentlyContinue)) {
Write-Stderr "error: cannot find winfsp.net.*.nupkg"
exit 1
}
# check winfsp.nupkg # check winfsp.nupkg
if (!(Test-Path "$ProjectRoot\build\VStudio\build\Release\winfsp*.nupkg" -ErrorAction SilentlyContinue)) { if (!(Test-Path "$ProjectRoot\build\VStudio\build\Release\winfsp.*.nupkg" -ErrorAction SilentlyContinue)) {
Write-Stderr "error: cannot find winfsp*.nupkg" Write-Stderr "error: cannot find winfsp.*.nupkg"
exit 1 exit 1
} }
@ -324,7 +330,7 @@ function Make-ChocoRelease {
Check-Assets Check-Assets
Push-Location "$ProjectRoot\build\VStudio\build\Release" Push-Location "$ProjectRoot\build\VStudio\build\Release"
choco push choco push (Resolve-Path winfsp.[0-9]*.nupkg)
if ($LastExitCode -ne 0) { if ($LastExitCode -ne 0) {
Write-Stderr "error: cannot push to Chocolatey" Write-Stderr "error: cannot push to Chocolatey"
exit 1 exit 1