forked from SumoLogic/sumologic-net-appenders
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSumoLogic.Logging.CI.bat
64 lines (56 loc) · 1.4 KB
/
SumoLogic.Logging.CI.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@echo off
goto:setpathanddir
:pauseandexit
rem pause
exit /b %LASTEXITCODE%
:error
echo EXITING WITH ERROR CODE %LASTEXITCODE%
chdir /d "%ORIG_PATH%"
goto:pauseandexit
:success
chdir /d "%ORIG_PATH%"
goto:pauseandexit
:setpathanddir
echo SETTING PATH AND CHANGING DIRECTORY...
echo ======================================
set PATH=C:\Windows\Microsoft.NET\Framework64\v4.0.30319;%PATH%
set ORIG_PATH=%cd%
set SCRIPT_PATH=%~dp0
chdir /d "%SCRIPT_PATH:~0,-1%"
echo DONE SETTING PATH AND CHANGING DIRECTORY
echo.
:updatepackages
echo UPDATING NUGET PACKAGES ...
echo ===========================
.\.nuget\nuget.exe restore SumoLogic.Logging.sln
dotnet restore SumoLogic.Logging.sln
set LASTEXITCODE=%ERRORLEVEL%
if NOT "%LASTEXITCODE%"=="0" (
echo ERROR UPDATING NUGET PACKAGES
goto:error
)
echo DONE UPDATING NUGET PACKAGES
echo.
:build
echo BUILDING SOLUTION ...
echo =====================
dotnet msbuild SumoLogic.Logging.CI.csproj "/v:m"
set LASTEXITCODE=%ERRORLEVEL%
if NOT "%LASTEXITCODE%"=="0" (
echo ERROR BUILDING SOLUTION
goto:error
)
echo DONE BUILDING SOLUTION
echo.
:runtests
echo RUNNING TESTS ...
echo =================
dotnet msbuild SumoLogic.Logging.CI.csproj "/t:RunTestsWithCoverage" "/v:m"
set LASTEXITCODE=%ERRORLEVEL%
if NOT "%LASTEXITCODE%"=="0" (
echo ERROR RUNNING TESTS
goto:error
)
echo DONE RUNNING TESTS
echo.
goto:success