forked from uComponents/nuPickers
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build-appveyor.cmd
38 lines (28 loc) · 1.08 KB
/
build-appveyor.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
ECHO APPVEYOR_REPO_BRANCH: %APPVEYOR_REPO_BRANCH%
ECHO APPVEYOR_REPO_TAG: %APPVEYOR_REPO_TAG%
ECHO APPVEYOR_BUILD_NUMBER : %APPVEYOR_BUILD_NUMBER%
ECHO APPVEYOR_BUILD_VERSION : %APPVEYOR_BUILD_VERSION%
ECHO CONFIGURATION : %CONFIGURATION%
CALL NuGet restore source\nupickers.sln
cd build
SET toolsFolder=%CD%\tools\
IF NOT EXIST "%toolsFolder%" (
MD tools
)
IF NOT EXIST "%toolsFolder%vswhere.exe" (
ECHO vswhere not found - fetching now
nuget install vswhere -Version 2.3.2 -Source nuget.org -OutputDirectory tools
)
FOR /f "delims=" %%A in ('dir "%toolsFolder%vswhere.*" /b') DO SET "vswhereExePath=%toolsFolder%%%A\"
MOVE "%vswhereExePath%tools\vswhere.exe" "%toolsFolder%vswhere.exe"
for /f "usebackq tokens=1* delims=: " %%i in (`"%CD%\tools\vswhere.exe" -latest -requires Microsoft.Component.MSBuild`) do (
if /i "%%i"=="installationPath" set InstallDir=%%j
)
SET VSWherePath="%InstallDir%\MSBuild"
ECHO.
ECHO Visual Studio is installed in: %InstallDir%
CALL "%InstallDir%\MSBuild\15.0\Bin\amd64\MsBuild.exe" nupickers.proj %~1
@IF %ERRORLEVEL% NEQ 0 GOTO err
@EXIT /B 0
:err
@EXIT /B 1