Created
November 24, 2022 00:26
-
-
Save jeffhandley/e52ae72bc8d1adee331fc233fd6220f7 to your computer and use it in GitHub Desktop.
PowerShell alias for invoking the dotnet/runtime build script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Yes, I hate having to type "./" _that_ much. | |
New-Alias -Name "build" -Value BuildRuntime | |
function BuildRuntime { | |
$root = $((git rev-parse --show-toplevel 2> $Null) ?? "").Replace("\", "/") | |
$runtime = (Resolve-Path "~/git/dotnet/runtime").Path.Replace("\", "/") | |
if ($root -eq $runtime) { | |
& "~/git/dotnet/runtime/build.cmd" $ARGS | |
} else { | |
echo "Not in the runtime repo" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment