forked from CityofSantaMonica/SODA.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.cmd
41 lines (26 loc) · 1.13 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
@echo off
cls
set TARGET="Default"
if not "%1" == "" (set TARGET="%1")
set BUILDMODE="Release"
if not "%2" == "" (set BUILDMODE="%2")
set MSBUILDDIR="%WINDIR%\Microsoft.NET\Framework\v4.0.30319"
set NUGETDIR=".\tools\nuget"
set SODADIR=".\SODA"
set UTILSDIR=".\SODA.Utilities"
echo Restoring NuGet package dependencies
call %NUGETDIR%\nuget.exe restore
echo Rebuilding solution with Configuration: %BUILDMODE%
call %MSBUILDDIR%\msbuild.exe SODA.sln /m "/p:Configuration=%BUILDMODE%" "/p:Platform=Any CPU" /t:Clean,Build
echo Finished solution rebuild
if %TARGET% == "CreatePackages" (
echo Creating NuGet packages with Configuration: %BUILDMODE%
call xcopy %SODADIR%\bin\%BUILDMODE%\*.* %SODADIR%\lib\ /y
call xcopy %UTILSDIR%\bin\%BUILDMODE%\*.* %UTILSDIR%\lib\ /y
call %NUGETDIR%\nuget.exe pack %SODADIR%\SODA.csproj -Properties "Configuration=%BUILDMODE%;Platform=AnyCPU"
call %NUGETDIR%\nuget.exe pack %UTILSDIR%\SODA.Utilities.csproj -IncludeReferencedProjects -Properties "Configuration=%BUILDMODE%;Platform=AnyCPU"
rd /S /Q %SODADIR%\lib
rd /S /Q %UTILSDIR%\lib
echo Finished NuGet package creation
)
exit /B %errorlevel%