From 65d49fcdf9b34ebce0495f9bc31484b04d075ff2 Mon Sep 17 00:00:00 2001 From: Anthony Date: Fri, 18 Sep 2020 20:09:54 +0100 Subject: [PATCH 1/3] Update last updated timestamps --- .../lib/BsdataGallery/BsdataGallery.psm1 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 b/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 index def7e7fb..088488c8 100644 --- a/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 +++ b/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 @@ -19,9 +19,10 @@ 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 + $_.catpkg.properties.lastUpdated = [datetime]::ParseExact($_.catpkg.properties.lastUpdated, 'MM/dd/yyyy HH:mm:ss', $null).ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff+0000") + return $_.catpkg.properties + }) } return $galleryJsonContent } @@ -67,7 +68,7 @@ function Get-GHApiUpdatedResult { [Parameter()] [int]$RetryIntervalSec = 5 ) - + # get object from API, but only if newer than what we've got already try { $apiArgs = @{ @@ -260,11 +261,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 { @@ -308,4 +309,4 @@ function Update-BsdataGalleryIndex { } } -Export-ModuleMember Update-BsdataGalleryIndex, Get-BsdataGalleryCatpkg \ No newline at end of file +Export-ModuleMember Update-BsdataGalleryIndex, Get-BsdataGalleryCatpkg From 29b17d0aebba7d02f990c55bde127292a4ff5c07 Mon Sep 17 00:00:00 2001 From: Anthony Date: Sat, 19 Sep 2020 19:53:54 +0100 Subject: [PATCH 2/3] Please our boy amis --- .../actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 b/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 index 088488c8..21f577f4 100644 --- a/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 +++ b/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 @@ -20,7 +20,7 @@ function Get-BsdataGalleryCatpkg { } + $GallerySettings.urls + @{ repositories = @($entries.cache | ForEach-Object { $_.catpkg.properties.archived = $_.repo.archived -eq $true - $_.catpkg.properties.lastUpdated = [datetime]::ParseExact($_.catpkg.properties.lastUpdated, 'MM/dd/yyyy HH:mm:ss', $null).ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff+0000") + $_.catpkg.properties.lastUpdated = $_.catpkg.properties.lastUpdated.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff+0000") return $_.catpkg.properties }) } From 77527b880df17f9b8ecfb3f059f7327cc605f89b Mon Sep 17 00:00:00 2001 From: Anthony Date: Sun, 20 Sep 2020 13:22:07 +0100 Subject: [PATCH 3/3] add a comment for amis :( --- .../actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 b/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 index 21f577f4..d68b7ed6 100644 --- a/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 +++ b/.github/actions/compile-index/lib/BsdataGallery/BsdataGallery.psm1 @@ -20,6 +20,7 @@ function Get-BsdataGalleryCatpkg { } + $GallerySettings.urls + @{ repositories = @($entries.cache | ForEach-Object { $_.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 })