Skip to content

Commit 6bb29f4

Browse files
Arlodotexemichael-hawker
authored andcommitted
Update UseUnoWinUI script to accommodate submodule
1 parent 6f52e43 commit 6bb29f4

File tree

1 file changed

+3
-27
lines changed

1 file changed

+3
-27
lines changed

MultiTarget/UseUnoWinUI.ps1

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
11
Param (
22
[Parameter(HelpMessage = "The WinUI version to use when building an Uno head.", Mandatory = $true)]
33
[ValidateSet('2', '3')]
4-
[string]$winUIMajorVersion,
5-
6-
[Parameter(HelpMessage = "Disables suppressing changes to the affected files in git, allowing changes to be committed.")]
7-
[switch]$allowGitChanges = $false
4+
[string]$winUIMajorVersion
85
)
96

10-
# Suppress git warning "core.useBuiltinFSMonitor will be deprecated soon; use core.fsmonitor instead"
11-
& git config advice.useCoreFSMonitorConfig false;
12-
13-
function SupressOrAllowChanges([string] $filePath) {
14-
if ($allowGitChanges.IsPresent) {
15-
git update-index --no-assume-unchanged $filePath
16-
}
17-
else {
18-
git update-index --assume-unchanged $filePath
19-
}
20-
}
21-
227
function ApplyWinUISwap([string] $filePath) {
23-
SupressOrAllowChanges $filePath;
24-
258
$fileContents = Get-Content -Path $filePath;
269

2710
if ($winUIMajorVersion -eq "3") {
@@ -42,17 +25,10 @@ function ApplyWinUISwap([string] $filePath) {
4225
Write-Output "Updated $(Resolve-Path -Relative $filePath)"
4326
}
4427

45-
Write-Output "Switching to WinUI $winUIMajorVersion";
28+
Write-Output "Switching Uno to WinUI $winUIMajorVersion";
4629

4730
ApplyWinUISwap $PSScriptRoot/../ProjectHeads/App.Head.Uno.props
4831
ApplyWinUISwap $PSScriptRoot/PackageReferences/Uno.props
4932
ApplyWinUISwap $PSScriptRoot/WinUI.TargetVersion.props
5033

51-
if ($allowGitChanges.IsPresent) {
52-
Write-Warning "Changes to the default Uno package settings in Labs can now be committed.`r`nRun this command again without -allowGitChanges to disable committing further changes.";
53-
}
54-
else {
55-
Write-Output "Changes to the default Uno package settings in Labs are now suppressed.`r`nTo switch branches, run `"git reset --hard`" with a clean working tree.";
56-
}
57-
58-
Write-Output "Done, switched to WinUI $winUIMajorVersion"
34+
Write-Output "Done. Please close and regenerate your solution. Do not commit these changes to the tooling repository."

0 commit comments

Comments
 (0)