From 2bb03f556cdaf4bcb7d25c7d232121f72dc7b5a7 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Wed, 4 Dec 2019 22:56:14 +0100 Subject: [PATCH] Run nuget restore in the .bat files --- debugbuild.bat | 10 +++------- preparerelease.bat | 29 ----------------------------- releasebuild.bat | 10 +++------- 3 files changed, 6 insertions(+), 43 deletions(-) delete mode 100644 preparerelease.bat diff --git a/debugbuild.bat b/debugbuild.bat index 90325ccab..fdce6272c 100644 --- a/debugbuild.bat +++ b/debugbuild.bat @@ -1,6 +1,6 @@ @setlocal enabledelayedexpansion @set MSBUILD= -@for /D %%M in ("%ProgramFiles(x86)%\Microsoft Visual Studio\2019"\*) do ( +@for /D %%M in ("%ProgramFiles(x86)%\Microsoft Visual Studio\2019"\*) do @( @if exist "%%M\MSBuild\Current\Bin\MSBuild.exe" ( @set "MSBUILD=%%M\MSBuild\Current\Bin\MSBuild.exe" ) @@ -9,9 +9,5 @@ @echo Could not find VS2019 MSBuild @exit /b 1 ) -"%MSBUILD%" ILSpy.sln /p:Configuration=Debug "/p:Platform=Any CPU" -@IF %ERRORLEVEL% NEQ 0 ( - @pause - @exit /b 1 -) -@exit /b 0 +@nuget restore ILSpy.sln || (pause && exit /b 1) +"%MSBUILD%" ILSpy.sln /p:Configuration=Debug "/p:Platform=Any CPU" || (pause && exit /b 1) diff --git a/preparerelease.bat b/preparerelease.bat deleted file mode 100644 index d2b141357..000000000 --- a/preparerelease.bat +++ /dev/null @@ -1,29 +0,0 @@ -@setlocal enabledelayedexpansion -@set MSBUILD= -@for /D %%M in ("%ProgramFiles(x86)%\Microsoft Visual Studio\2019"\*) do ( - @if exist "%%M\MSBuild\Current\Bin\MSBuild.exe" ( - @set "MSBUILD=%%M\MSBuild\Current\Bin\MSBuild.exe" - ) -) -@if "%MSBUILD%" == "" ( - @echo Could not find VS2019 MSBuild - @exit /b 1 -) -@del ICSharpCode.Decompiler\bin\Release\*.nupkg -"%MSBUILD%" ILSpy.sln /p:Configuration=Release "/p:Platform=Any CPU" -@IF %ERRORLEVEL% NEQ 0 ( - @pause - @exit /b 1 -) -@if not exist "%ProgramFiles%\7-zip\7z.exe" ( - @echo Could not find 7zip - @exit /b 1 -) -@del artifacts.zip -@rmdir /Q /S artifacts -@mkdir artifacts -"%ProgramFiles%\7-zip\7z.exe" a artifacts\ILSpy_binaries.zip %cd%\ILSpy\bin\Release\net46\*.dll %cd%\ILSpy\bin\Release\net46\*.exe %cd%\ILSpy\bin\Release\net46\*.config -@copy ILSpy.AddIn\bin\Release\net46\ILSpy.AddIn.vsix artifacts\ -@copy ICSharpCode.Decompiler\bin\Release\*.nupkg artifacts\ -"%ProgramFiles%\7-zip\7z.exe" a artifacts.zip %cd%\artifacts\* -@exit /b 0 diff --git a/releasebuild.bat b/releasebuild.bat index cd881dd67..d8cc7595b 100644 --- a/releasebuild.bat +++ b/releasebuild.bat @@ -1,6 +1,6 @@ @setlocal enabledelayedexpansion @set MSBUILD= -@for /D %%M in ("%ProgramFiles(x86)%\Microsoft Visual Studio\2019"\*) do ( +@for /D %%M in ("%ProgramFiles(x86)%\Microsoft Visual Studio\2019"\*) do @( @if exist "%%M\MSBuild\Current\Bin\MSBuild.exe" ( @set "MSBUILD=%%M\MSBuild\Current\Bin\MSBuild.exe" ) @@ -9,9 +9,5 @@ @echo Could not find VS2019 MSBuild @exit /b 1 ) -"%MSBUILD%" ILSpy.sln /p:Configuration=Release "/p:Platform=Any CPU" -@IF %ERRORLEVEL% NEQ 0 ( - @pause - @exit /b 1 -) -@exit /b 0 +@nuget restore ILSpy.sln || (pause && exit /b 1) +"%MSBUILD%" ILSpy.sln /p:Configuration=Release "/p:Platform=Any CPU" || (pause && exit /b 1)