Skip to content

Commit

Permalink
fix: PSModuleInfo.Site - Fixing Mirror Behavior
Browse files Browse the repository at this point in the history
Also updating manifest to reflect expected reality.
  • Loading branch information
James Brundage committed Mar 22, 2024
1 parent c407896 commit 1c3bff0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions PipeScript.ps.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,12 @@
Extension = '.svg','.png','.js','.css'
}

Site = "https://pipescript.dev", @{
Name = 'GitHub Page'
Url = 'https://pipescript.startautomating.com'
Site = 'https://pipescript.startautomating.com', @{
Tech = 'Jekyll'
Root = '/docs'
}, @{
Name = 'Backend'
Url ='https://api.pipescript.startautomating.com'
Mirror = 'https://pipescript.dev/','https://pipescript.io/', 'https://pipescript.info/'
Tech = 'AzureKubernetesService'
}

Expand Down
6 changes: 5 additions & 1 deletion Types/PSModuleInfo/get_Site.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ if (-not $this.'.Website') {
foreach ($potentialSite in $this.FindMetadata('Site', 'Sites', 'Website', 'Websites')) {
if ($potentialSite -is [string]) {
if (-not $CombinedSiteData.BaseUrl) {
$CombinedSiteData.BaseUrl = $potentialSite
$CombinedSiteData.Url = $potentialSite
} else {
$CombinedSiteData.Mirrors += $potentialSite
}
} else {
if ($potentialSite -is [Collections.IDictionary]) {
$potentialSite = [PSCustomObject]$potentialSite
}
if (-not $firstPropertyBag) {
$CombinedSiteData.Mirrors += $potentialSite
} else {
$firstPropertyBag = $false
foreach ($prop in $potentialSite.psobject.properties) {
$CombinedSiteData[$prop.Name] = $prop.Value
}
Expand Down

0 comments on commit 1c3bff0

Please sign in to comment.