-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add checksums (SHA256) to GitHub releases for all files #29656
Comments
Thank you for opening this issue, we will look into it. |
Hi @o-l-a-v, I noticed https://github.com/Beaver-Notes/Beaver-Notes/releases/tag/3.5.0 puts SHA256s in the release description: https://github.com/PowerShell/PowerShell/releases/tag/v7.4.4 uses a different format: How does Scoop extract this information from plaintext? |
I have a PR on Beaver Notes for Scoop that shows the info Scoop needs to fetch the SHA256 checksums: Here's the manifest for pwsh, looks like it fetches SHA256 info from release info too: Here's info on the Scoop app manifest: Here's Scoop main manifest repos, see if you can find more examples there:
Edit: And I believe the logic for getting new versions is found inside here: Which calls |
Thanks @o-l-a-v, but I think you misunderstand my question. In other words, how is BTW, I noticed Scoop computes the SHA256 of https://azcliprod.blob.core.windows.net/zip/azure-cli-2.63.0-x64.zip by itself: https://github.com/ScoopInstaller/Main/blob/75c4fa28f734a4849633a8bd920013bf7d93911a/bucket/azure-cli.json#L13 |
As the feature request states: Scoop can calculate SHA256 by downloading the artifact. But if checksum is already made available and Scoop is told were to look, it does not have to 1) download the artifact and 2) calculate hash. Scoop has logic to autoupdate manifests. If we add hash ( {
...
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/Beaver-Notes/Beaver-Notes/releases/download/$version/Beaver-notes.$version.portable.exe#/dl.7z"
},
"arm64": {
"url": "https://github.com/Beaver-Notes/Beaver-Notes/releases/download/$version/Beaver-notes.$version.portable.arm64.exe#/dl.7z"
}
},
"hash": {
"url": "https://github.com/Beaver-Notes/Beaver-Notes/releases/tag/$version",
"regex": "$sha256.*?$basename"
}
}
} And for pwsh https://github.com/ScoopInstaller/Main/blob/master/bucket/pwsh.json: {
...
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/PowerShell/PowerShell/releases/download/v$version/PowerShell-$version-win-x64.zip"
},
"32bit": {
"url": "https://github.com/PowerShell/PowerShell/releases/download/v$version/PowerShell-$version-win-x86.zip"
},
"arm64": {
"url": "https://github.com/PowerShell/PowerShell/releases/download/v$version/PowerShell-$version-win-arm64.zip"
}
},
"hash": {
"url": "$baseurl/hashes.sha256"
}
}
} |
There are som You could probably also just add checksum files to the GitHub release instead of adding it as plain text, if you prefer that. |
Thank you for the detailed explanation. BTW, we can reuse the code from https://github.com/PowerShell/PowerShell/blob/a1774fd9332925f7635e0832b64b2d158e3a3745/.pipelines/templates/release-githubtasks.yml#L88-L104 |
Related command
Add checksums (SHA256) to releases for all files, be it files hosted on GitHub (MSI, source code), and files from
azcliprod.blob.core.windows.net
(ZIP, MSI etc.).Is your feature request related to a problem? Please describe.
azcliprod.blob.core.windows.net
is so slow.Describe the solution you'd like
Add a list to GitHub releases with SHA256, like Beaver Notes does:
Describe alternatives you've considered
None.
Additional context
None.
The text was updated successfully, but these errors were encountered: