Microsoft.Maui.Graphics/build.ps1

20 строки
567 B
PowerShell
Исходник Обычный вид История

2022-03-23 20:41:54 +03:00
# script inspired by https://andrewlock.net/simplifying-the-cake-global-tool-bootstrapper-scripts-in-netcore3-with-local-tools/
[CmdletBinding()]
Param(
[string]$Script = "build.cake",
[string]$Target,
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
[string[]]$ScriptArgs
)
# Restore Cake tool
& dotnet tool restore
# Build Cake arguments
$cakeArguments = @("$Script");
if ($Target) { $cakeArguments += "--target=$Target" }
$cakeArguments += $ScriptArgs
& dotnet tool run dotnet-cake -- $cakeArguments
exit $LASTEXITCODE