-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathbuild-appveyor.cmd
42 lines (31 loc) · 1.28 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
39
40
41
42
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.exe restore src\UmbracoFileSystemProviders.Azure.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.7.1 -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"
SETLOCAL EnableDelayedExpansion
:: This string specifies vs 2019
:: set vswherestr=^"!%CD%\tools\vswhere.exe^" -version [16.0,17.0^^) -latest -prerelease -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
set vswherestr=^"!%CD%\tools\vswhere.exe^" -latest -prerelease -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
for /f "usebackq tokens=*" %%i in (`!vswherestr!`) do (
set MsBuildDir=%%i
)
ECHO.
ECHO MsBuild is installed in: %MsBuildDir%
CALL "%MsBuildDir%" package.proj %~1
@IF %ERRORLEVEL% NEQ 0 GOTO err
@EXIT /B 0
:err
@EXIT /B 1