forked from dotnet/razor-compiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
26 lines (22 loc) · 842 Bytes
/
build.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
# Check dotnet-format is installed or not
$dotnetFormat = Get-Command dotnet-format -ErrorAction Ignore -CommandType Application
if ($dotnetFormat)
{
Write-Host -f Magenta "dotnet format tool is already installed."
}
else
{
Write-Host -f Magenta "Installing dotnet-format tool.."
& dotnet tool install -g dotnet-format
}
# We need to change default git hooks directory as .git folder is not tracked. And by default hooks are stored in .git/hooks folder.
# So we are setting git hooks default directory to .githooks, so that we can track and version the git hooks.
& git config core.hooksPath .githooks
& $PSScriptRoot\eng\common\Build.ps1 -restore -build -pack $args
function ExitWithExitCode([int] $exitCode) {
if ($ci -and $prepareMachine) {
Stop-Processes
}
exit $exitCode
}
ExitWithExitCode $LASTEXITCODE