Changes the defunct download URL to the currently used one.
Uses the GitHub tags page to get the latest release version number, instead of the download page of the MySQL site (an alternative would be to parse https://api.github.com/repos/mysql/mysql-server/tags instead).
Specifies the mainline version prefix, since there can be multiple maintained release lines by Oracle.
Motivation and Context
The currently used download URL is incorrect, because it was changed on the MySQL website.
It is currently not possible to get the latest version, because the MySQL website requires a JavaScript enabled browser.
How Has this Been Tested?
I ran the update script locally:
PS C:\Repositories\chocolatey-packages\automatic\mysql> .\update.ps1
mysql - checking updates using au version 2022.10.24
URL check
https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-8.0.34-winx64.zip
nuspec version: 8.0.31
remote version: 8.0.34
New version is available
Automatic checksum started
Adding 'C:\tools\mysql\current\bin' to the path and the current shell path
PATH environment variable does not have C:\tools\mysql\current\bin in it. Adding...
Using system proxy server ''.
Downloading chocolatey\mysql 64 bit
from 'https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-8.0.34-winx64.zip'
Using system proxy server ''.
Download of mysql-8.0.34-winx64.zip (231,68 MB) completed.
Package downloaded and hash calculated for 64 bit version
Setting package description from README.md
Updating files
$Latest data:
Checksum64 (String) d0480039bceef97a558027bfb868b77be1717ec1097410c697db383315243895
ChecksumType64 (String) sha256
FileType (String) zip
NuspecVersion (String) 8.0.31
PackageName (String) mysql
URL64 (String) https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-8.0.34-winx64.zip
Version (String) 8.0.34
mysql.nuspec
setting id: mysql
updating version: 8.0.31 -> 8.0.34
tools\chocolateyInstall.ps1
(^[$]checksumType\s*=\s*)('.*') = $1'sha256'
(^[$]url\s*=\s*)('.*') = $1'https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-8.0.34-winx64.zip'
(^[$]checksum\s*=\s*)('.*') = $1'd0480039bceef97a558027bfb868b77be1717ec1097410c697db383315243895'
Attempting to build package from 'mysql.nuspec'.
Successfully created package 'C:\Repositories\chocolatey-packages\automatic\mysql\mysql.8.0.34.nupkg'
Package updated
Path : C:\Repositories\chocolatey-packages\automatic\mysql
Name : mysql
Updated : True
Pushed : False
RemoteVersion : 8.0.34
NuspecVersion : 8.0.31
Result : {mysql - checking updates using au version 2022.10.24, , URL check, https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-8.0.34-winx64.zip…}
Error :
NuspecPath : C:\Repositories\chocolatey-packages\automatic\mysql\mysql.nuspec
NuspecXml : #document
Ignored : False
IgnoreMessage :
StreamsPath : C:\Repositories\chocolatey-packages\automatic\mysql\mysql.json
Streams :
Screenshot (if appropriate, usually isn't needed):
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Migrated package (a package has been migrated from another repository)
Checklist:
[x] My code follows the code style of this repository.
[ ] My change requires a change to documentation (this usually means the notes in the description of a package).
[ ] I have updated the documentation accordingly (this usually means the notes in the description of a package).
[ ] I have updated the package description and it is less than 4000 characters.
Description
https://api.github.com/repos/mysql/mysql-server/tags
instead).Motivation and Context
How Has this Been Tested?
I ran the update script locally:
Screenshot (if appropriate, usually isn't needed):
Types of changes
Checklist: