From ec6c4a15a83723addcdce55fad0691c47d66a904 Mon Sep 17 00:00:00 2001 From: "Kim J. Nordmo" Date: Mon, 27 Mar 2023 17:48:14 +0200 Subject: [PATCH 1/2] (wixtoolset) Change to track wix3 releases Due to changes upstream on the website, to make continued checks as easy as possible this commit changes to explicitly only track releases made on GitHub for version 3 of the software. ref #2187 --- automatic/wixtoolset/update.ps1 | 37 ++++++++++---------------- automatic/wixtoolset/wixtoolset.nuspec | 1 + 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/automatic/wixtoolset/update.ps1 b/automatic/wixtoolset/update.ps1 index 5458f2823f2..fd2a83a745e 100644 --- a/automatic/wixtoolset/update.ps1 +++ b/automatic/wixtoolset/update.ps1 @@ -1,10 +1,10 @@ Import-Module AU Import-Module "$PSScriptRoot\..\..\scripts\au_extensions.psm1" -#$redirectPage = 'http://wixtoolset.org/releases/v3-10-3-3007/' # Provided in case we need to update the latest stable -$releases = 'http://wixtoolset.org/releases/' +# We are currently tracking version 3. We only track version 3 as it looks like version 4 will be available as a .NET tool, +# and possibly not through its own installer. + $softwareName = 'WiX Toolset*' -$padUnderVersion = '3.10.4' function global:au_BeforeUpdate { Get-RemoteFiles -Purge -NoSuffix } @@ -25,31 +25,22 @@ function global:au_SearchReplace { } } } -function global:au_GetLatest { - $builder = New-Object System.UriBuilder($releases) - $download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing - $re = '(rc[\d]+|stable)$' - $builder.Path = $download_page.Links | ? href -match $re | select -first 1 -expand href - $redirectPage = Get-RedirectedUrl $builder.ToString() - $preReleaseSuffix = if ($builder.Path.EndsWith('stable')) { '' } - else { - $index = $builder.Path.IndexOf('rc') - "-" + $builder.Path.Substring($index) - } +function global:au_AfterUpdate { + Update-Metadata -key 'releaseNotes' -value $Latest.ReleaseNotes +} - $downloadBuilder = New-Object System.UriBuilder($redirectPage) - $download_page = Invoke-WebRequest -Uri $redirectPage -UseBasicParsing - $downloadBuilder.Path = $download_page.Links | ? href -match "\.exe$" | select -first 1 -expand href +function global:au_GetLatest { + $release = Get-GitHubRelease -Owner 'wixtoolset' -Name 'wix3' - $verRe = '\/v?' - $version32 = ($builder.Path -split "$verRe" | select -last 1 -skip 1) -replace '\-','.' - if ($preReleaseSuffix) { $version32 += $preReleaseSuffix } + $url = $release.assets | ? browser_download_url -match "\.exe$" | Select-Object -First 1 -ExpandProperty browser_download_url + $version = $release.name -split 'v' | Select-Object -Last 1 @{ - URL32 = $downloadBuilder.Uri.ToString() - Version = $version32 - ReleasesUrl = $redirectPage + URL32 = $url + Version = Get-Version $version + ReleasesUrl = $release.html_url + ReleaseNotes = $release.body } } diff --git a/automatic/wixtoolset/wixtoolset.nuspec b/automatic/wixtoolset/wixtoolset.nuspec index 043289fe807..ac5366248c1 100644 --- a/automatic/wixtoolset/wixtoolset.nuspec +++ b/automatic/wixtoolset/wixtoolset.nuspec @@ -32,6 +32,7 @@ With Burn, the WiX bootstrapper, you can create setup bundles that install prere The WiX SDK includes managed and native libraries that make it easier to write code that works with Windows Installer, including custom actions in both C# and C++. ]]> + Will be replaced by updater From 5b6c046002d917e4b9ddd97b0dae33a340bcdac9 Mon Sep 17 00:00:00 2001 From: "Kim J. Nordmo" Date: Mon, 27 Mar 2023 17:54:14 +0200 Subject: [PATCH 2/2] (wixtoolset) Remove unused chocolatey-core dependency The only reason remaining to keep a dependency on chocolatey-core.extension is to provide backwards functionality to Chocolatey CLI v0.10.15 (or earlier). As this is outside of the range we support, there is no longer a need for this dependency --- automatic/wixtoolset/wixtoolset.nuspec | 1 - 1 file changed, 1 deletion(-) diff --git a/automatic/wixtoolset/wixtoolset.nuspec b/automatic/wixtoolset/wixtoolset.nuspec index ac5366248c1..fdb2b5460f5 100644 --- a/automatic/wixtoolset/wixtoolset.nuspec +++ b/automatic/wixtoolset/wixtoolset.nuspec @@ -35,7 +35,6 @@ The WiX SDK includes managed and native libraries that make it easier to write c Will be replaced by updater -