-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
93 lines (75 loc) · 2.81 KB
/
build.bat
File metadata and controls
93 lines (75 loc) · 2.81 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@echo Off
set config=%1
if "%config%" == "" (
set config=Release
)
echo **************************************************
echo **** version %version%
echo **** BuildCounter %BuildCounter%
echo **** packversionsuffix %packversionsuffix%
echo **** PackageVersion %PackageVersion%
echo **************************************************
set version=
REM if not "%BuildCounter%" == "" (
REM set packversionsuffix=-%BuildCounter%
REM )
REM set PackageVersion=1.0.0-Beta2-%BuildCounter%
REM set PackageVersion=1.0.0
set version = %PackageVersion%
echo **************************************************
echo **** version %version%
echo **** BuildCounter %BuildCounter%
echo **** packversionsuffix %packversionsuffix%
echo **** PackageVersion %PackageVersion%
echo **************************************************
REM (optional) build.bat is in the root of our repo, cd to the correct folder where sources/projects are
REM cd MyLibrary
REM Restore
echo *********************************
echo **** Restoring package
echo *********************************
call dotnet restore SharpBatch.sln --verbosity m
if not "%errorlevel%"=="0" goto failure
echo *********************************
echo **** Restore completed
echo *********************************
REM Build
echo *********************************
echo **** Build started
echo *********************************
call "%MsBuildExe%" SharpBatch.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
REM call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" SharpBatch.NoWeb.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false
if not "%errorlevel%"=="0" goto failure
echo *********************************
echo **** Build ended
echo *********************************
REM Meta Package
echo *********************************
echo **** Nuget SharpBatch.all
echo *********************************
cd src\SharpBatch.All
call "%NuGet%" pack SharpBatch.All.nuspec -Version "%PackageVersion%" -Properties DepVersion="%PackageVersion%"
if not "%errorlevel%"=="0" goto failure
cd ..\..\
echo *********************************
echo **** Nuget SharpBatch.all Ended
echo *********************************
REM Unit tests
echo *********************************
echo **** Test Started
echo *********************************
cd test\SharpBatchTest
call dotnet test --configuration %config% --verbosity m
if not "%errorlevel%"=="0" goto failure
cd ..\SharpBatch.Serialization.Xml
call dotnet test --configuration %config% --verbosity m
if not "%errorlevel%"=="0" goto failure
echo *********************************
echo **** Test ended
echo *********************************
:success
echo success
exit 0
:failure
echo failed
exit -1