forked from commandlineparser/commandline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.cmd
49 lines (37 loc) · 1.08 KB
/
build.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
43
44
45
46
47
48
49
@echo off
setlocal
cls
if "%1" == "" goto :USAGE
if "%1" == "base" set BUILD_TARGET=base
if "%1" == "fsharp" set BUILD_TARGET=fsharp
echo.
echo SKIP_RESTORE=%SKIP_RESTORE% ^<^< Set to true if have already restored packages
if "%SKIP_RESTORE%" == "" choice /T 5 /D Y /M "Continue?"
if "%SKIP_RESTORE%" == "true" goto :BUILD_NET
.paket\paket.bootstrapper.exe
if errorlevel 1 (
exit /b %errorlevel%
)
.paket\paket.exe restore
if errorlevel 1 (
exit /b %errorlevel%
)
:BUILD_NET
echo.
msbuild CommandLine.sln /p:Configuration=Release /p:OutputPath=%~dp0\release\%BUILD_TARGET%\net4x
if "%SKIP_RESTORE%" == "true" goto :BUILD_NETSTD
echo.
echo dotnet restore
dotnet restore
:BUILD_NETSTD
echo.
echo dotnet build --output %~dp0\release\%BUILD_TARGET%\netstandard1.5
dotnet build --configuration Release --output %~dp0release\%BUILD_TARGET%\netstandard1.5 --framework netstandard1.5 src\commandline
goto :END
:USAGE
echo.
echo Invalid arguments specified.
echo.
echo Usage: build <build_target>
echo where <build_target> is base or fsharp
:END