Skip to content

Commit

Permalink
Merge branch 'main' into dev/test-process-dumps
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe authored Aug 21, 2024
2 parents d13dbda + 028fe9c commit aba9f2f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
7 changes: 1 addition & 6 deletions Build-Toolkit-Components.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Specifies the date for versioning in 'YYMMDD' format. The default value is the current date.
.PARAMETER PreviewVersion
Specifies the preview version to use if packaging is enabled. Appended with a dash after the version number (formatted Version-PreviewVersion). This parameter is required when NupkgOutput is supplied.
Specifies the preview version to use if packaging is enabled. Appended with a dash after the version number (formatted Version-PreviewVersion). This parameter is optional.
.PARAMETER NupkgOutput
Specifies the output directory for .nupkg files. This parameter is optional. When supplied, the components will also be packed and nupkg files will be output to the specified directory.
Expand Down Expand Up @@ -114,11 +114,6 @@ if ($ExcludeComponents) {
$Components = $Components | Where-Object { $_ -notin $ExcludeComponents }
}

# Check if NupkgOutput is supplied without PreviewVersion
if ($NupkgOutput -and -not $PreviewVersion) {
throw "PreviewVersion is required when NupkgOutput is supplied."
}

# Use the specified MultiTarget TFM and WinUI version
& $PSScriptRoot\MultiTarget\UseTargetFrameworks.ps1 $MultiTargets
& $PSScriptRoot\MultiTarget\UseUnoWinUI.ps1 $WinUIMajorVersion
Expand Down
3 changes: 1 addition & 2 deletions Build-Toolkit-Gallery.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ if ($ExcludeComponents) {
$Components = $Components | Where-Object { $_ -notin $ExcludeComponents }
}

# Certain Components are required to build the gallery app.
# Add them if not already included.
# Certain ProjectReferences should always be generated (are required to build gallery) if csproj is available.
if ($Components -notcontains 'SettingsControls') {
$Components += 'SettingsControls'
}
Expand Down
8 changes: 8 additions & 0 deletions MultiTarget/GenerateAllProjectReferences.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ foreach ($componentName in $Components) {
continue;
}

# Don't generate project reference if component isn't available
if (!(Test-Path "$PSScriptRoot/../../components/$componentName/")) {
continue;
}

# Find all components source csproj (when wildcard), or find specific component csproj by name.
foreach ($componentPath in Get-Item "$PSScriptRoot/../../components/$componentName/") {
$componentName = $componentPath.BaseName;
Write-Output "Generating project references for component $componentName at $componentPath";

# Find source and sample csproj files
$componentSourceCsproj = Get-ChildItem $componentPath/src/*.csproj -ErrorAction SilentlyContinue;
$componentSampleCsproj = Get-ChildItem $componentPath/samples/*.csproj -ErrorAction SilentlyContinue;
Expand Down

0 comments on commit aba9f2f

Please sign in to comment.