-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathbuild-ui.ps1
More file actions
29 lines (22 loc) · 762 Bytes
/
build-ui.ps1
File metadata and controls
29 lines (22 loc) · 762 Bytes
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
$BlazorProjectPath = Get-ChildItem -Path "src\**\*.Blazor.csproj"
$Destination = ".\src\HttpTracker.Dashboard\Blazor"
$PublishPath = ".\src\HttpTracker.Dashboard.Blazor\publish"
function dotnet-build {
dotnet build -c Release $BlazorProjectPath
}
function dotnet-publish {
echo "***** $_ *****"
dotnet publish -c Release $BlazorProjectPath -p:PublishDir=publish
}
function migration-file {
Remove-Item $Destination -Force -Recurse
Copy-Item -Path $PublishPath\wwwroot -Destination $Destination -Recurse -Force -Passthru
Remove-Item $PublishPath -Force -Recurse
}
@( "dotnet-build", "dotnet-publish", "migration-file" ) | ForEach-Object {
echo ""
echo "***** $_ *****"
echo ""
&$_
if ($LastExitCode -ne 0) { Exit $LastExitCode }
}