forked from dotnet/tye
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use out-of-proc MSBuild evaluation (dotnet#674)
* Use out-of-proc MSBuild evaluation This allows for support for new SDKs/TFMs without needing tye to target those TFMs * Combine restore and metadata evaluation * Batch process projects
- Loading branch information
John Luo
authored
Sep 28, 2020
1 parent
f0c4f2f
commit bbef222
Showing
18 changed files
with
267 additions
and
164 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@ECHO OFF | ||
SETLOCAL | ||
PowerShell -NoProfile -NoLogo -ExecutionPolicy ByPass -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; try { & '%~dp0clean.ps1' %*; exit $LASTEXITCODE } catch { write-host $_; exit 1 }" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#requires -version 5 | ||
|
||
<# | ||
.SYNOPSIS | ||
Clean this repository. | ||
.DESCRIPTION | ||
This script cleans this repository interactively, leaving downloaded infrastructure untouched. | ||
Clean operation is interactive to avoid losing new but unstaged files. Press 'c' then [Enter] | ||
to perform the proposed deletions. | ||
.EXAMPLE | ||
Perform default clean operation. | ||
clean.ps1 | ||
.EXAMPLE | ||
Clean everything but downloaded infrastructure and VS / VS Code folders. | ||
clean.ps1 -e .vs/ -e .vscode/ | ||
#> | ||
|
||
[CmdletBinding(PositionalBinding = $false)] | ||
param( | ||
# Other lifecycle targets | ||
[switch]$Help, # Show help | ||
|
||
# Capture the rest | ||
[Parameter(ValueFromRemainingArguments = $true)] | ||
[string[]]$GitArguments | ||
) | ||
|
||
Set-StrictMode -Version 2 | ||
$ErrorActionPreference = 'Stop' | ||
|
||
if ($Help) { | ||
Get-Help $PSCommandPath | ||
exit 0 | ||
} | ||
|
||
git clean -dix -e .dotnet/ -e .tools/ @GitArguments | ||
git checkout -- $(git ls-files -d) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
# | ||
# Functions | ||
# | ||
__usage() { | ||
echo "Usage: $(basename "${BASH_SOURCE[0]}") <Arguments> | ||
Arguments: | ||
<Arguments>... Arguments passed to the 'git' command. Any number of arguments allowed. | ||
Description: | ||
This script cleans the repository interactively, leaving downloaded infrastructure untouched. | ||
Clean operation is interactive to avoid losing new but unstaged files. Press 'c' then [Enter] | ||
to perform the proposed deletions. | ||
" | ||
} | ||
|
||
git_args=() | ||
|
||
while [[ $# -gt 0 ]]; do | ||
case $1 in | ||
-\?|-h|--help) | ||
__usage | ||
exit 0 | ||
;; | ||
*) | ||
git_args[${#git_args[*]}]="$1" | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
# This incantation avoids unbound variable issues if git_args is empty | ||
# https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u | ||
git clean -dix -e .dotnet/ -e .tools/ ${git_args[@]+"${git_args[@]}"} |
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
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
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
Oops, something went wrong.