-
-
Notifications
You must be signed in to change notification settings - Fork 75
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 #250
base: master
Are you sure you want to change the base?
Conversation
❌ Package verification failed, please review the Appveyor Logs and the provided Artifacts before requesting a human reviewer to take a look. |
Changed indentation to 2 spaces because that's what it's set to in the .editorconfig Changed charset to utf-8-bom because that's what it's set to in the .editorconfig Removed a few extraneous newlines Fixed alignment on lines 12 and 13
❌ Package verification failed, please review the Appveyor Logs and the provided Artifacts before requesting a human reviewer to take a look. |
automatic/mysql/update.ps1
Outdated
$url = 'https://dev.mysql.com/get/Downloads/MySQL-' + $versiondata.toString(2) + '/mysql-' + $version + '-winx64.zip' | ||
$Latest = @{ URL64 = $url; Version = $version } | ||
return $Latest | ||
$url = 'https://cdn.mysql.com/Downloads/MySQL-' + $versiondata.toString(2) + '/mysql-' + $version + '-winx64.msi' |
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.
Switching from ZIP installer to MSI would imply changes to the package's internal work. This is not desirable as this has been and always will be a portable package.
In the past, the MSI file was there and went away and came back and that 100 times over. To keep this package on track, the Windows ZIP fille should still be used, if available.
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.
The ZIP file is available. Switching to MSI was sloppy on my part, when I copy/pasted from mysql.workbench
.
automatic/mysql/update.ps1
Outdated
if (Test-Path Env:\github_api_key) { | ||
$headers.Authorization = "token " + $env:github_api_key | ||
} |
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.
The GitHub api key should always be required. If not available, this package should not be able to be updated.
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.
I changed it to require the env var.
❌ Package verification failed, please review the Appveyor Logs and the provided Artifacts before requesting a human reviewer to take a look. |
I re-ran
C:\Users\Joseph\Github\chocolatey-packages\automatic\mysql>git diff
warning: CRLF will be replaced by LF in automatic/mysql/mysql.nuspec.
The file will have its original line endings in your working directory
diff --git a/automatic/mysql/mysql.nuspec b/automatic/mysql/mysql.nuspec
index c1b64bc7b..db4ea71d2 100644
--- a/automatic/mysql/mysql.nuspec
+++ b/automatic/mysql/mysql.nuspec
@@ -26,7 +26,7 @@ This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Refe
<!-- version should MATCH as closely as possible with the underlying software -->
<!-- Is the version a prerelease of a version? https://docs.nuget.org/create/versioning#creating-prerelease-packages -->
<!-- Note that unstable versions like 0.0.1 can be considered a released version, but it's possible that one can release a 0.0.1-beta before you release a 0.0.1 version. If the version number is final, that is considered a released version and not a prerelease. -->
- <version>8.0.31</version>
+ <version>9.0.0</version>
<!-- owners is a poor name for maintainers of the package. It sticks around by this name for compatibility reasons. It basically means you. -->
<owners>Maurice Kevenaar; Rob Reynolds</owners>
<!-- ============================== -->
diff --git a/automatic/mysql/tools/chocolateyInstall.ps1 b/automatic/mysql/tools/chocolateyInstall.ps1
index f9eebca12..d884ad148 100644
--- a/automatic/mysql/tools/chocolateyInstall.ps1
+++ b/automatic/mysql/tools/chocolateyInstall.ps1
@@ -1,7 +1,7 @@
<EF><BB><BF>$ErrorActionPreference = 'Stop';
-$url = 'https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.31-winx64.zip'
-$checksum = 'f51ceeed82756df4f4251400aa2078c1024e71bdd9d03f9b919c8a796a000d89'
+$url = 'https://cdn.mysql.com/Downloads/MySQL-9.0/mysql-9.0.0-winx64.zip'
+$checksum = '78434ad24eca3b6717322446bb5ff0cf3cd8cb223c4e22adb2c67f7a416b6743'
$checksumType = 'sha256'
$pp = Get-PackageParameters
IDK why it's not passing CI. |
Description
I changed the
mysql
update.ps1 script to be similar to themysql.workbench
update.ps1 script. The big difference is that I had to filter out "mysql-cluster-[VERSION]" tags, and figure out the CDN URL.Motivation and Context
Fixes #249
How Has this Been Tested?
I ran
powershell .\update.ps1
and it found the latest (mysql 9.0.0)Screenshot (if appropriate, usually isn't needed):
Types of changes
Checklist: