-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(mysql) Fix automatic MySQL update in update.ps1
#214
base: master
Are you sure you want to change the base?
Conversation
✅ Package verification completed without issues. PR is now pending human review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #215
@@ -1,6 +1,7 @@ | |||
import-module au | |||
|
|||
$releases = 'https://dev.mysql.com/downloads/mysql/' | |||
$releases = 'https://github.com/mysql/mysql-server/tags' | |||
$mainlineVersionPrefix = '8.0.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as #215
@@ -15,11 +16,10 @@ function global:au_SearchReplace { | |||
function global:au_GetLatest { | |||
$download_page = Invoke-WebRequest -Uri $releases | |||
|
|||
$version = ($download_page.ParsedHtml.getElementsByTagName('h1') | Where-Object innerhtml -match "^MySQL Community Server ").innerhtml -replace "^MySQL Community Server " | |||
$versiondata = Get-Version($version) | |||
$versiondata = $download_page.Links.Href | Where-Object { $_ -match '^/mysql/mysql-server/releases/tag/mysql-(\d+\.\d+\.\d+)$' -and $Matches[1].StartsWith($mainlineVersionPrefix) } | ForEach-Object { Get-Version $_ } | Sort-Object -Property Version -Descending | Select-Object -First 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as #215
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: