forked from getgauge/gauge-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.cmd
45 lines (37 loc) · 1.05 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
@echo off
set tasks=build test package install uninstall forceinstall
for %%a in (%tasks%) do (
if %1==%%a goto %1
)
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
dotnet test --no-build -c release integration-test\Gauge.Dotnet.IntegrationTests.csproj
goto :eof
:package
rmdir /s /q deploy artifacts
dotnet publish -c release -o ..\deploy\bin src\Gauge.Dotnet.csproj
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%