Disable committing updates to TargetFrameworks file by default

This commit is contained in:
Arlo Godfrey 2022-04-08 15:51:01 -05:00
Родитель ca8b6a9d31
Коммит 37a1bbc4ec
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -3,6 +3,14 @@ if ($args.Length -eq 0 -or ![bool]$args[0]) {
exit(-1);
}
if ($args.Contains("--allow-git-changes")) {
Write-Warning "Changes to the default TargetFrameworks in Labs can now be committed. Run this command again without the --allow-git-changes flag to disable committing further changes.";
git update-index --no-assume-unchanged .\..\Labs.TargetFrameworks.props;
}
else {
git update-index --assume-unchanged .\..\Labs.TargetFrameworks.props;
}
$WasmTfm = "WasmLibTargetFramework";
$UwpTfm = "UwpTargetFramework";
$WinAppSdkTfm = "WinAppSdkTargetFramework";
@ -63,7 +71,7 @@ if ($args.Contains("droid")) {
$desiredTfmValues += $DroidTfm;
}
$targetFrameworksToRemove = $allTargetFrameworks.Where({-not $desiredTfmValues.Contains($_)})
$targetFrameworksToRemove = $allTargetFrameworks.Where({ -not $desiredTfmValues.Contains($_) })
$targetFrameworksToRemoveRegexPartial = $targetFrameworksToRemove -join "|";