Skip to content

Commit

Permalink
Update last updated timestamps (#16)
Browse files Browse the repository at this point in the history
* Update last updated timestamps

* Please our boy amis

* add a comment for amis :(
  • Loading branch information
Technoblazed authored Sep 20, 2020
1 parent 1f3247b commit 55a7e82
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ function Get-BsdataGalleryCatpkg {
battleScribeVersion = ($entries.cache.catpkg.properties.battleScribeVersion | Sort-Object -Bottom 1) -as [string]
} + $GallerySettings.urls + @{
repositories = @($entries.cache | ForEach-Object {
$_.catpkg.properties.archived = $_.repo.archived -eq $true
return $_.catpkg.properties
})
$_.catpkg.properties.archived = $_.repo.archived -eq $true
# temporary fix due to the BS app not supporting proper date formats :(
$_.catpkg.properties.lastUpdated = $_.catpkg.properties.lastUpdated.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff+0000")
return $_.catpkg.properties
})
}
return $galleryJsonContent
}
Expand Down Expand Up @@ -67,7 +69,7 @@ function Get-GHApiUpdatedResult {
[Parameter()]
[int]$RetryIntervalSec = 5
)

# get object from API, but only if newer than what we've got already
try {
$apiArgs = @{
Expand Down Expand Up @@ -263,11 +265,11 @@ function Update-BsdataGalleryIndex {
# Path to index entries directory
[Parameter(Mandatory)]
[string]$IndexPath,

[Parameter(Mandatory)]
[string]$Token
)

# read registry entries
$registry = [ordered]@{ }
Get-ChildItem $RegistrationsPath *.catpkg.yml | Sort-Object Name | ForEach-Object {
Expand Down Expand Up @@ -311,4 +313,4 @@ function Update-BsdataGalleryIndex {
}
}

Export-ModuleMember Update-BsdataGalleryIndex, Get-BsdataGalleryCatpkg
Export-ModuleMember Update-BsdataGalleryIndex, Get-BsdataGalleryCatpkg

0 comments on commit 55a7e82

Please sign in to comment.