forked from getgauge/gauge-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.cmd
53 lines (43 loc) · 1.36 KB
/
run.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
50
51
52
53
@echo off
set tasks=build, test, package, install, uninstall, forceinstall
if [%1] == [] goto :usage
for %%a in (%tasks%) do (
if %%a==%1 goto %1
)
:usage
echo Options: "[build | test | package | install | uninstall | forceinstall]"
goto :eof
:build
dotnet build -c release
goto :eof
:test
dotnet test --no-build -c release test\Gauge.Dotnet.UnitTests.csproj
if %ERRORLEVEL% GEQ 1 exit %ERRORLEVEL%
dotnet test --no-build -c release integration-test\Gauge.Dotnet.IntegrationTests.csproj
if %ERRORLEVEL% GEQ 1 exit %ERRORLEVEL%
goto :eof
:package
rmdir /s /q deploy artifacts
dotnet publish -c release -o .\deploy\bin\net6.0 src\Gauge.Dotnet.csproj -f net6.0
dotnet publish -c release -o .\deploy\bin\net7.0 src\Gauge.Dotnet.csproj -f net7.0
dotnet publish -c release -o .\deploy\bin\net8.0 src\Gauge.Dotnet.csproj -f net8.0
copy src\launcher.sh deploy\
copy src\launcher.cmd deploy\
copy src\dotnet.json deploy\
mkdir artifacts
call :powershell zip
goto :eof
:install
call :package
call :powershell install
goto :eof
:forceinstall
call :uninstall
call :install
goto :eof
:uninstall
call :powershell uninstall
goto :eof
:powershell
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command "& '.\%~1.ps1'"
if %errorlevel% neq 0 exit /b %errorlevel%