forked from Chinchilla-Software-Com/ClickUpAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.bat
43 lines (35 loc) · 1.63 KB
/
build.bat
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
43
@ECHO OFF
REM build script for MyGet builds
REM *** NOTE *** When running this locally, remove the quotes from around the executable variables (e.g. %GitPath%).
REM MyGet requires the quotes, but the command line doesn't like them. Don't ask me...
REM Start build
set config=%1
if "%config%" == "" (
set config=Release
)
set PackageVersion=
REM Restore packages
call powershell "& .\nuget-restore.ps1"
REM Detect MSBuild 15.0 path
if exist "%programfiles(x86)%\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" (
set msbuild="%programfiles(x86)%\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe"
)
if exist "%programfiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" (
set msbuild="%programfiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
)
if exist "%programfiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe" (
set msbuild="%programfiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
)
if exist "%programfiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" (
set msbuild="%programfiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
)
REM Run build
call %msbuild% Chinchilla.ClickUp.sln /p:Configuration="%config%" /m:1 /v:m /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
if not "%errorlevel%"=="0" goto failure
REM package
call %msbuild% Chinchilla.ClickUp\Chinchilla.ClickUp.csproj /t:pack /p:Configuration="%config%"
if not "%errorlevel%"=="0" goto failure
:success
REM exit 0
:failure
REM exit -1