-
Notifications
You must be signed in to change notification settings - Fork 2
/
entry.ps1
51 lines (48 loc) · 993 Bytes
/
entry.ps1
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
param(
[string]
[ValidateSet(
"clean",
"restore",
"build",
"run",
"format",
"test",
"publish",
"serve:publish",
"pre"
)]
$Command,
[string] $Configuration = "Release",
[string] $Filter = ""
)
$sampleProject = "./EventHorizon.Blazor.Interop.Sample/EventHorizon.Blazor.Interop.Sample.csproj"
switch ($Command) {
"clean" {
dotnet clean
}
"restore" {
dotnet restore --no-cache
}
"build" {
dotnet build --no-incremental --no-cache
}
"run" {
dotnet run --project $sampleProject
}
"format" {
dotnet csharpier .
}
"test" {
echo "No Tests to Run"
}
"publish" {
dotnet publish -c $Configuration -o ./published $sampleProject
}
"serve:publish" {
./entry.ps1 publish
dotnet serve -d="./published/wwwroot"
}
Default {
Write-Output "Invalid Command"
}
}