diff --git a/.github/EventLogs.ps1 b/.github/EventLogs.ps1 new file mode 100644 index 00000000..bf231c27 --- /dev/null +++ b/.github/EventLogs.ps1 @@ -0,0 +1,59 @@ +#require -version 3.0 + +<# +.SYNOPSIS + Clear all event logs +#> +function Clear-EventLogs { + Get-EventLog * | ForEach-Object { + try { + Clear-EventLog $_.Log + } + catch { + Write-Warning 'Error during clearing event logs' + Write-Warning "$_" + } + } + + #Clear this one again as it accumulates clearing events from previous step + try { + Clear-EventLog System + } + catch { + Write-Warning 'Error during clearing event logs' + Write-Warning "$_" + } + Get-EventLog * +} + +<# +.SYNOPSIS + Get latest event logs across all event logs +.Example + logs Error,Warning -Newest 5 +#> +function Get-EventLogs { + param( + [ValidateSet('Error', 'Information', 'Warning', '*')] + [string[]] $EntryType = 'Error', + + [int] $Newest = 1000, + + [switch] $Raw + ) + $r = @() + + if ($EntryType -eq '*') { $EntryType = 'Error', 'Information', 'Warning' } + Get-EventLog * | ForEach-Object Log | ForEach-Object { + $log = $_ + try { + $r += Get-EventLog -Log $log -Newest $Newest -EntryType $EntryType -ea 0 + } + catch { Write-Warning "$log - $_" } + } + $r = $r | Sort-Object TimeWritten -Descending + if ($Raw) { $r } else { $r | Select-Object Source, TimeWritten, Message } +} + +Set-Alias logs Get-EventLogs +Set-Alias clearlogs Clear-EventLogs diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..e69de29b diff --git a/.github/workflows/package-pusher.yml b/.github/workflows/package-pusher.yml new file mode 100644 index 00000000..54a870b7 --- /dev/null +++ b/.github/workflows/package-pusher.yml @@ -0,0 +1,72 @@ +name: Package Pusher + +on: + workflow_dispatch: + inputs: + packages: + description: "What is the packages you wish to push?" + required: true + +jobs: + pusher: + runs-on: windows-2019 + env: + au_version: master + github_user_repo: ${{ github.repository }} + api_key: ${{ secrets.CHOCO_API_KEY }} + + steps: + - name: Install Dependencies + run: | + Set-Service wuauserv -StartupType Manual + choco install wormies-au-helpers vt-cli -y + Install-Module Pester -RequiredVersion 4.10.1 -Scope CurrentUser -Force -SkipPublisherCheck + git clone -q https://github.com/chocolatey-community/chocolatey-au.git $Env:TEMP/au + . "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version + shell: powershell + - name: System information + run: | + Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version + $PSVersionTable + git --version + choco --version + "Build info" + ' {0,-20} {1}' -f 'SCHEDULED BUILD:', ("${{ github.event_name }}" -eq 'schedule') + ' {0,-20} {1}' -f 'FORCED BUILD:' , ("${{ github.event_name }}" -eq 'workflow_dispatch') + shell: powershell + - uses: actions/checkout@v3.5.0 + with: + fetch-depth: 0 + - name: Run package pushing + env: + PACKAGES_PUSHES: ${{ github.event.inputs.packages }} + run: | + $packages = $env:PACKAGES_PUSHES -split ' ' + Write-Host "PUSHING PACKAGES: $packages" + foreach ($package in $packages) { + Write-Host ("{0}`n{1}`n" -f ('-'*60), "PACKAGE: $package") + $package_dir = ls -recurse | ? { $_.Name -eq "$package.nuspec" } | select -First 1 | % Directory + + if (!$package_dir) { Write-Warning "Can't find package '$package'"; continue } + pushd $package_dir + if (Test-Path update.ps1 -ea 0) { ./update.ps1 } + choco pack + Push-Package + popd + } + shell: powershell + - name: Create diff file + run: | + git add automatic extension manual templates + git diff --cached > unsaved_changes.patch + shell: powershell + - name: Upload artifacts + if: always() + uses: actions/upload-artifact@v3 + with: + name: artifacts + path: | + unsaved_changes.patch + eventlogs.txt + **/*.nupkg + retention-days: 5 diff --git a/.github/workflows/package-updater.yml b/.github/workflows/package-updater.yml new file mode 100644 index 00000000..e1946c28 --- /dev/null +++ b/.github/workflows/package-updater.yml @@ -0,0 +1,88 @@ +name: Package Updater + +on: + push: + branches: [master] + workflow_dispatch: + inputs: + packages: + description: "What is the packages (optionally version) you wish to force update on?" + required: false + schedule: + - cron: "0 3 * * *" + +jobs: + updater: + runs-on: windows-2019 + env: + au_version: master + au_push: true + github_user_repo: ${{ github.repository }} + github_api_key: ${{ secrets.GIST_API_KEY }} + gist_id: a700c70b8847b29ebb1c918d47ee4eb1 + nupkg_cache_path: C:\nupkg_cache + mail_user: ${{ secrets.MAIL_USER }} + mail_pass: ${{ secrets.MAIL_PASSWORD }} + mail_server: smtp.gmail.com + mail_port: 587 + mail_enablessl: true + api_key: ${{ secrets.CHOCO_API_KEY }} + nuget_artifacts: ${{ github.runner.temp }}/artifacts + + steps: + - name: Configure git client + run: | + git config --global user.email "chocolatey@realdimensions.net" + git config --global user.name "Chocolatey" + git config --global core.safecrlf false + - name: Install Dependencies + run: | + Set-Service wuauserv -StartupType Manual + git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au + . "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version + shell: powershell + - name: System information + run: | + Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version + $PSVersionTable + git --version + choco --version + "Build info" + ' {0,-20} {1}' -f 'SCHEDULED BUILD:', ("${{ github.event_name }}" -eq 'schedule') + ' {0,-20} {1}' -f 'FORCED BUILD:' , ("${{ github.event_name }}" -eq 'workflow_dispatch') + shell: powershell + - uses: actions/checkout@v3.5.0 + with: + fetch-depth: 0 + - name: Run package updater + env: + FORCED_PACKAGES: ${{ github.event.inputs.packages }} + run: | + . ./.github/EventLogs.ps1 + Clear-EventLogs + Remove-Item "$Env:ChocolateyInstall\logs\*.log" + + ./update_all.ps1 -ForcedPackages $env:FORCED_PACKAGES + Get-EventLogs * | ? Source -eq 'Schannel' | Format-List * | Out-File eventlogs.txt + shell: powershell + - name: Create diff file + run: | + git add automatic extension manual templates + git diff --cached > unsaved_changes.patch + - name: Create au temporary directory + run: | + if (Test-Path $Env:TEMP\chocolatey\au) { 7z a -mx9 au_temp.7z $Env:TEMP\chocolatey\au\* } + shell: powershell + - name: Upload artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: artifacts + path: | + unsaved_changes.patch + au_temp.7z + update_info.xml + Update-AUPackages.md + eventlogs.txt + **/*.nupkg + retention-days: 5 diff --git a/fzf/fzf.nuspec b/fzf/fzf.nuspec index 681df6da..13bf2830 100644 --- a/fzf/fzf.nuspec +++ b/fzf/fzf.nuspec @@ -5,7 +5,7 @@ fzf A command-line fuzzy finder - 0.53.0 + 0.55.0 Junegunn Choi Miodrag Milic fzf is a general-purpose command-line fuzzy finder @@ -26,7 +26,7 @@ fzf is a general-purpose command-line fuzzy finder. https://raw.githubusercontent.com/junegunn/fzf-bin/master/LICENSE false https://cdn.rawgit.com/majkinetor/chocolatey/master/fzf/icon.png - https://github.com/junegunn/fzf/releases/tag/0.53.0 + https://github.com/junegunn/fzf/releases/tag/v0.55.0 https://github.com/junegunn/fzf/blob/master/README.md https://github.com/junegunn/fzf/issues https://github.com/junegunn/fzf diff --git a/fzf/update.ps1 b/fzf/update.ps1 index 8896d543..1bbe4523 100644 --- a/fzf/update.ps1 +++ b/fzf/update.ps1 @@ -22,7 +22,7 @@ function global:au_GetLatest { $version = $url -split '/' | select -Last 1 -Skip 1 return @{ - Version = $version + Version = $version.Substring(1) URL32 = $url ReleaseNotes = "$GitHubRepositoryUrl/releases/tag/$version" } diff --git a/postgresql/postgresql.json b/postgresql/postgresql.json index 640d4644..b7dc25fc 100644 --- a/postgresql/postgresql.json +++ b/postgresql/postgresql.json @@ -1,176 +1,188 @@ -{ - "9.4": "9.4.26", - "9.5": "9.5.25.1", - "9.6": "9.6.24.1", - "10.10": "10.10", - "11.5": "11.5", - "postgresql": "16.1", - "postgresql-9.4": "9.4.26", - "postgresql-10.10": "10.10", - "postgresql-9.5": "9.5.25.1", - "postgresql-9.6": "9.6.24.1", - "postgresql-12.0": "12.0", - "12.0": "12.0", - "postgresql-10.11": "10.11", - "10.11": "10.11", - "postgresql-11.6": "11.6", - "11.6": "11.6", - "postgresql-12.1": "12.1", - "12.1": "12.1", - "postgresql-10.12": "10.12", - "10.12": "10.12", - "postgresql-11.7": "11.7", - "11.7": "11.7", - "postgresql-12.2": "12.2", - "12.2": "12.2", - "postgresql-10.13": "10.13.2", - "10.13": "10.13.2", - "postgresql-11.8": "11.8.2", - "11.8": "11.8.2", - "postgresql-12.3": "12.3", - "12.3": "12.3", - "postgresql-10.14": "10.14.1", - "10.14": "10.14.1", - "postgresql-11.9": "11.9.1", - "11.9": "11.9.1", - "postgresql-12.4": "12.4.1", - "12.4": "12.4.1", - "postgresql-13.0": "13.0.1", - "13.0": "13.0.1", - "postgresql-10.15": "10.15.1", - "10.15": "10.15.1", - "postgresql-11.10": "11.10.2", - "11.10": "11.10.2", - "postgresql-12.5": "12.5.1", - "12.5": "12.5.1", - "postgresql-13.1": "13.1.1", - "13.1": "13.1.1", - "postgresql-10.16": "10.16.2", - "10.16": "10.16.2", - "postgresql-11.11": "11.11.3", - "11.11": "11.11.3", - "postgresql-12.6": "12.6.3", - "12.6": "12.6.3", - "postgresql-13.2": "13.2.2", - "13.2": "13.2.2", - "postgresql-10.17": "10.17.2", - "10.17": "10.17.2", - "postgresql-11.12": "11.12.2", - "11.12": "11.12.2", - "postgresql-12.7": "12.7.2", - "12.7": "12.7.2", - "postgresql-13.3": "13.3.2", - "13.3": "13.3.2", - "postgresql-10.18": "10.18.2", - "10.18": "10.18.2", - "postgresql-11.13": "11.13.2", - "11.13": "11.13.2", - "postgresql-12.8": "12.8.2", - "12.8": "12.8.2", - "postgresql-13.4": "13.4.2", - "13.4": "13.4.2", - "postgresql-14.0": "14.0.1", - "14.0": "14.0.1.20211027", - "postgresql-10.19": "10.19.1", - "10.19": "10.19.1", - "postgresql-11.14": "11.14.1", - "11.14": "11.14.1", - "postgresql-12.9": "12.9.1", - "12.9": "12.9.1", - "postgresql-13.5": "13.5.1", - "13.5": "13.5.1", - "postgresql-14.1": "14.1.1", - "14.1": "14.1.1", - "postgresql-10.20": "10.20.2", - "10.20": "10.20.2", - "postgresql-11.15": "11.15.2", - "11.15": "11.15.2", - "postgresql-12.10": "12.10.2", - "12.10": "12.10.2", - "postgresql-13.6": "13.6.2", - "13.6": "13.6.2", - "postgresql-14.2": "14.2.2", - "14.2": "14.2.2", - "postgresql-10.21": "10.21.1", - "10.21": "10.21.1", - "postgresql-11.16": "11.16.1", - "11.16": "11.16.1", - "postgresql-12.11": "12.11.1", - "12.11": "12.11.1", - "postgresql-13.7": "13.7.1", - "13.7": "13.7.1", - "postgresql-14.3": "14.3.1", - "14.3": "14.3.1", - "postgresql-14.4": "14.4.1", - "14.4": "14.4.1", - "postgresql-10.22": "10.22.1", - "10.22": "10.22.1", - "postgresql-11.17": "11.17.1", - "11.17": "11.17.1", - "postgresql-12.12": "12.12.1", - "12.12": "12.12.1", - "postgresql-13.8": "13.8.1", - "13.8": "13.8.1", - "postgresql-14.5": "14.5.1", - "14.5": "14.5.1", - "postgresql-15.0": "15.0.2", - "15.0": "15.0.2", - "postgresql-10.23": "10.23.1", - "10.23": "10.23.1", - "postgresql-11.18": "11.18.1", - "11.18": "11.18.1", - "postgresql-12.13": "12.13.1", - "12.13": "12.13.1", - "postgresql-13.9": "13.9.3", - "13.9": "13.9.3", - "postgresql-14.6": "14.6.2", - "14.6": "14.6.2", - "postgresql-15.1": "15.1.1", - "15.1": "15.1.1", - "postgresql-9.3": "9.3.25", - "9.3": "9.3.25", - "postgresql-11.19": "11.19", - "11.19": "11.19", - "postgresql-12.14": "12.14", - "12.14": "12.14", - "postgresql-13.10": "13.10", - "13.10": "13.10", - "postgresql-14.7": "14.7", - "14.7": "14.7", - "postgresql-15.2": "15.2", - "15.2": "15.2", - "postgresql-11.20": "11.20", - "11.20": "11.20", - "postgresql-12.15": "12.15", - "12.15": "12.15", - "postgresql-13.11": "13.11", - "13.11": "13.11", - "postgresql-14.8": "14.8", - "14.8": "14.8", - "postgresql-15.3": "15.3", - "15.3": "15.3", - "postgresql-11.21": "11.21", - "11.21": "11.21", - "postgresql-12.16": "12.16", - "12.16": "12.16", - "postgresql-13.12": "13.12", - "13.12": "13.12", - "postgresql-14.9": "14.9", - "14.9": "14.9", - "postgresql-15.4": "15.4", - "15.4": "15.4", - "postgresql-16.0": "16.0", - "16.0": "16.0", - "postgresql-11.22": "11.22", - "11.22": "11.22", - "postgresql-12.17": "12.17", - "12.17": "12.17", - "postgresql-13.13": "13.13", - "13.13": "13.13", - "postgresql-14.10": "14.10", - "14.10": "14.10", - "postgresql-15.5": "15.5", - "15.5": "15.5", - "postgresql-16.1": "16.1", - "16.1": "16.1" +{ + "9.4": "9.4.26", + "9.5": "9.5.25.1", + "9.6": "9.6.24.1", + "10.10": "10.10", + "11.5": "11.5", + "postgresql": "17.0", + "postgresql-9.4": "9.4.26", + "postgresql-10.10": "10.10", + "postgresql-9.5": "9.5.25.1", + "postgresql-9.6": "9.6.24.1", + "postgresql-12.0": "12.0", + "12.0": "12.0", + "postgresql-10.11": "10.11", + "10.11": "10.11", + "postgresql-11.6": "11.6", + "11.6": "11.6", + "postgresql-12.1": "12.1", + "12.1": "12.1", + "postgresql-10.12": "10.12", + "10.12": "10.12", + "postgresql-11.7": "11.7", + "11.7": "11.7", + "postgresql-12.2": "12.2", + "12.2": "12.2", + "postgresql-10.13": "10.13.2", + "10.13": "10.13.2", + "postgresql-11.8": "11.8.2", + "11.8": "11.8.2", + "postgresql-12.3": "12.3", + "12.3": "12.3", + "postgresql-10.14": "10.14.1", + "10.14": "10.14.1", + "postgresql-11.9": "11.9.1", + "11.9": "11.9.1", + "postgresql-12.4": "12.4.1", + "12.4": "12.4.1", + "postgresql-13.0": "13.0.1", + "13.0": "13.0.1", + "postgresql-10.15": "10.15.1", + "10.15": "10.15.1", + "postgresql-11.10": "11.10.2", + "11.10": "11.10.2", + "postgresql-12.5": "12.5.1", + "12.5": "12.5.1", + "postgresql-13.1": "13.1.1", + "13.1": "13.1.1", + "postgresql-10.16": "10.16.2", + "10.16": "10.16.2", + "postgresql-11.11": "11.11.3", + "11.11": "11.11.3", + "postgresql-12.6": "12.6.3", + "12.6": "12.6.3", + "postgresql-13.2": "13.2.2", + "13.2": "13.2.2", + "postgresql-10.17": "10.17.2", + "10.17": "10.17.2", + "postgresql-11.12": "11.12.2", + "11.12": "11.12.2", + "postgresql-12.7": "12.7.2", + "12.7": "12.7.2", + "postgresql-13.3": "13.3.2", + "13.3": "13.3.2", + "postgresql-10.18": "10.18.2", + "10.18": "10.18.2", + "postgresql-11.13": "11.13.2", + "11.13": "11.13.2", + "postgresql-12.8": "12.8.2", + "12.8": "12.8.2", + "postgresql-13.4": "13.4.2", + "13.4": "13.4.2", + "postgresql-14.0": "14.0.1", + "14.0": "14.0.1.20211027", + "postgresql-10.19": "10.19.1", + "10.19": "10.19.1", + "postgresql-11.14": "11.14.1", + "11.14": "11.14.1", + "postgresql-12.9": "12.9.1", + "12.9": "12.9.1", + "postgresql-13.5": "13.5.1", + "13.5": "13.5.1", + "postgresql-14.1": "14.1.1", + "14.1": "14.1.1", + "postgresql-10.20": "10.20.2", + "10.20": "10.20.2", + "postgresql-11.15": "11.15.2", + "11.15": "11.15.2", + "postgresql-12.10": "12.10.2", + "12.10": "12.10.2", + "postgresql-13.6": "13.6.2", + "13.6": "13.6.2", + "postgresql-14.2": "14.2.2", + "14.2": "14.2.2", + "postgresql-10.21": "10.21.1", + "10.21": "10.21.1", + "postgresql-11.16": "11.16.1", + "11.16": "11.16.1", + "postgresql-12.11": "12.11.1", + "12.11": "12.11.1", + "postgresql-13.7": "13.7.1", + "13.7": "13.7.1", + "postgresql-14.3": "14.3.1", + "14.3": "14.3.1", + "postgresql-14.4": "14.4.1", + "14.4": "14.4.1", + "postgresql-10.22": "10.22.1", + "10.22": "10.22.1", + "postgresql-11.17": "11.17.1", + "11.17": "11.17.1", + "postgresql-12.12": "12.12.1", + "12.12": "12.12.1", + "postgresql-13.8": "13.8.1", + "13.8": "13.8.1", + "postgresql-14.5": "14.5.1", + "14.5": "14.5.1", + "postgresql-15.0": "15.0.2", + "15.0": "15.0.2", + "postgresql-10.23": "10.23.1", + "10.23": "10.23.1", + "postgresql-11.18": "11.18.1", + "11.18": "11.18.1", + "postgresql-12.13": "12.13.1", + "12.13": "12.13.1", + "postgresql-13.9": "13.9.3", + "13.9": "13.9.3", + "postgresql-14.6": "14.6.2", + "14.6": "14.6.2", + "postgresql-15.1": "15.1.1", + "15.1": "15.1.1", + "postgresql-9.3": "9.3.25", + "9.3": "9.3.25", + "postgresql-11.19": "11.19", + "11.19": "11.19", + "postgresql-12.14": "12.14", + "12.14": "12.14", + "postgresql-13.10": "13.10", + "13.10": "13.10", + "postgresql-14.7": "14.7", + "14.7": "14.7", + "postgresql-15.2": "15.2", + "15.2": "15.2", + "postgresql-11.20": "11.20", + "11.20": "11.20", + "postgresql-12.15": "12.15", + "12.15": "12.15", + "postgresql-13.11": "13.11", + "13.11": "13.11", + "postgresql-14.8": "14.8", + "14.8": "14.8", + "postgresql-15.3": "15.3", + "15.3": "15.3", + "postgresql-11.21": "11.21", + "11.21": "11.21", + "postgresql-12.16": "12.16", + "12.16": "12.16", + "postgresql-13.12": "13.12", + "13.12": "13.12", + "postgresql-14.9": "14.9", + "14.9": "14.9", + "postgresql-15.4": "15.4", + "15.4": "15.4", + "postgresql-16.0": "16.0", + "16.0": "16.0", + "postgresql-11.22": "11.22", + "11.22": "11.22", + "postgresql-12.17": "12.17", + "12.17": "12.17", + "postgresql-13.13": "13.13", + "13.13": "13.13", + "postgresql-14.10": "14.10", + "14.10": "14.10", + "postgresql-15.5": "15.5", + "15.5": "15.5", + "postgresql-16.1": "16.1", + "16.1": "16.1", + "postgresql-12.20": "12.20", + "12.20": "12.20", + "postgresql-13.16": "13.16", + "13.16": "13.16", + "postgresql-14.13": "14.13", + "14.13": "14.13", + "postgresql-15.8": "15.8", + "15.8": "15.8", + "postgresql-16.4": "16.4", + "16.4": "16.4", + "postgresql-17.0": "17.0", + "17.0": "17.0" } diff --git a/postgresql/postgresql.nuspec b/postgresql/postgresql.nuspec index 7c76a0a7..4d5cc8de 100644 --- a/postgresql/postgresql.nuspec +++ b/postgresql/postgresql.nuspec @@ -1,8 +1,8 @@ - postgresql16 - 16.0 + postgresql17 + 17.0 PostgreSQL PostgreSQL Global Development Group majkinetor, cole.mike @@ -58,37 +58,37 @@ Each major version has its own package: `postgresql` To propagate package parameters to dependencies use `--params-global` choco install parameter with virtual package `postgresql`. Assuming latest version is 12, to provide password the following two examples result in identical installation: ``` -cinst postgresql --params '/Password:test' --params-global -cinst postgresql12 --params '/Password:test' +choco install postgresql --params '/Password:test' --params-global +choco install postgresql12 --params '/Password:test' ``` To uninstall dependent package use `--force-dependencies`: ``` # The following two examples are identical -cuninst postgresql --force-dependencies -cuninst postgresql12 postgresql +choco uninstall postgresql --force-dependencies +choco uninstall postgresql12 postgresql # This example uninstalls only postgresql virtual package and not postgresql12 -cuninst postgresql +choco uninstall postgresql ``` To force reinstallation via virtual package use `--force-dependencies`: ``` # The following two examples are identical -cinst postgresql --force --force-dependencies -cinst postgresql12 --force --force-dependencies +choco install postgresql --force --force-dependencies +choco install postgresql12 --force --force-dependencies # This will reinstall only postgresql virtual package and not its dependency postgresql12 -cinst postgresql -force +choco install postgresql -force # This one is different then the first one as vcredist140 dependency is not reinstalled -cinst postgresql12 --force +choco install postgresql12 --force ``` ]]> PostgreSQL is an object-relational database management system - https://www.postgresql.org/docs/16/static/release.html + https://www.postgresql.org/docs/17/static/release.html Copyright © 1996-2019 The PostgreSQL Global Development Group foss cross-platform postgres postgresql sql relational database admin https://github.com/postgres/postgres diff --git a/postgresql/tools/chocolateyInstall.ps1 b/postgresql/tools/chocolateyInstall.ps1 index e694340d..3ee361d6 100644 --- a/postgresql/tools/chocolateyInstall.ps1 +++ b/postgresql/tools/chocolateyInstall.ps1 @@ -19,15 +19,15 @@ if ($pp.Port) { Write-Host "Using port: $($pp.Port)"; $silentArgs.ServerPort = $ $packageArgs = @{ packageName = $Env:ChocolateyPackageName fileType = 'exe' - url64 = 'https://get.enterprisedb.com/postgresql/postgresql-16.0-1-windows-x64.exe' - checksum64 = '43D8F5F3E6FD3DDBEBD5D9814A5924AB24017A87AABBDE3AEC47ECC7A5783DED' + url64 = 'https://get.enterprisedb.com/postgresql/postgresql-17.0-1-windows-x64.exe' + checksum64 = '6B9CE3D07285666F6FBB391CE4C82CFEA4077F491E4E5AA11969C8FA0CB1F023' checksumType64 = 'sha256' url = '' checksum = '' checksumType32 = 'sha256' silentArgs = ($silentArgs.Keys | % { "--{0} {1}" -f $_.Tolower(), $silentArgs.$_}) -join ' ' validExitCodes = @(0) - softwareName = 'PostgreSQL 16*' + softwareName = 'PostgreSQL 17*' } Install-ChocolateyPackage @packageArgs Write-Host "Installation log: $Env:TEMP\install-postgresql.log" diff --git a/postgresql/tools/chocolateyUninstall.ps1 b/postgresql/tools/chocolateyUninstall.ps1 index 8b35b2db..7b47dbc1 100644 --- a/postgresql/tools/chocolateyUninstall.ps1 +++ b/postgresql/tools/chocolateyUninstall.ps1 @@ -1,7 +1,7 @@ $ErrorActionPreference = 'Stop' $packageName = $Env:ChocolateyPackageName -$softwareNamePattern = 'PostgreSQL 16*' +$softwareNamePattern = 'PostgreSQL 17*' [array] $key = Get-UninstallRegistryKey $softwareNamePattern if ($key.Count -eq 1) { diff --git a/postgresql/update.ps1 b/postgresql/update.ps1 index 0a1ca022..f3449c7c 100644 --- a/postgresql/update.ps1 +++ b/postgresql/update.ps1 @@ -52,9 +52,11 @@ function global:au_GetLatest { $version = $tds[0] -split '>' | select -Last 1 $version = $version.Replace('*', '') - $tds[4] -match "href='(.+?)'" | Out-Null + $tds[4] -match 'href="(.+?)"' | Out-Null $href = $Matches[1] + if (!$href) { Write-Host 'No href for' $version; continue } + [PSCUstomObject]@{ version = $version; href = $href } } @@ -64,7 +66,6 @@ function global:au_GetLatest { if (!$major) { continue } if (!$minor) { $minor = '0'; $item.version += '.0' } - $s1 = @{ Version = $item.version Url64 = Resolve-PostgreUrl $item.href @@ -72,6 +73,7 @@ function global:au_GetLatest { ReleaseNotes = "https://www.postgresql.org/docs/$major/static/release.html" SoftwareName = "PostgreSQL $major*" } + if ($s1.Url64.Trim() -eq '') { Write-Host "no URL for" $item.version; continue } $s2 = @{ Version = $item.version