Skip to content

Commit

Permalink
Merge pull request #199 from CommunityToolkit/fix/build-scripts/galle…
Browse files Browse the repository at this point in the history
…ry/labs

Fixed Build-Toolkit-Gallery script not working in Labs
  • Loading branch information
Arlodotexe authored Aug 19, 2024
2 parents acc45f7 + d834485 commit 7d5d479
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
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 7d5d479

Please sign in to comment.