Skip to content

Commit

Permalink
Include all releases to stats
Browse files Browse the repository at this point in the history
  • Loading branch information
olljanat authored Jun 22, 2024
1 parent 2d87f70 commit c22c36b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions collect-stats.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ $date = Get-Date -Date "2023-01-01"

$releases = Invoke-RestMethod https://api.github.com/repos/burmilla/os/releases
$githubStats = @()
$recentVersions = $releases | Where-Object {$_.published_at -gt $date}
forEach($v in $recentVersions) {
forEach($v in $releases) {
$iso = $v.assets | Where-Object {$_.name -like "*.iso" -and $_.name -notlike "*vmware*" -and $_.name -notlike "*proxmoxve*"}
$rootfs = $v.assets | Where-Object {$_.name -eq "rootfs.tar.gz"}
$githubStats += New-Object -TypeName PSObject -Property @{
Expand All @@ -22,8 +21,7 @@ $osStats | Select-Object last_updated,pull_count | Export-Csv DockerHubTotalPull

$dockerHubStats = @()
$osTagStats = Invoke-RestMethod "https://hub.docker.com/v2/repositories/burmilla/os/tags?page_size=100&page=1&ordering=last_updated"
$recentOsStats = $osTagStats.results | Where-Object {$_.tag_last_pushed -gt $date}
forEach($osTag in $recentOsStats) {
forEach($osTag in $osTagStats.results) {
$dockerHubStats += New-Object -TypeName PSObject -Property @{
name = $osTag.name
releaseDate = $osTag.tag_last_pushed.ToString("yyyy-MM-dd")
Expand Down

0 comments on commit c22c36b

Please sign in to comment.