Skip to content
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

Check the checksum after download #36

Open
satoshun00 opened this issue Nov 25, 2017 · 5 comments
Open

Check the checksum after download #36

satoshun00 opened this issue Nov 25, 2017 · 5 comments

Comments

@satoshun00
Copy link
Member

ref: #32 (comment)

actual: require('crypto').createHash('sha256').update(file).digest('hex')
expected: https://github.com/gohugoio/hugo/releases/download/v0.31/hugo_0.31_checksums.txt

@XhmikosR
Copy link
Collaborator

XhmikosR commented Jan 3, 2018

Hmm, this should be easy to add, but I can't find any way to make bin-wrapper not delete the dist file so that we can check the checksum.

@satoshun00
Copy link
Member Author

I'll do it this month.

@satoshun00
Copy link
Member Author

satoshun00 commented Feb 27, 2018

I found that is not easy to add checksum validation as long as hugo-bin depends on bin-wrapper that have no 'downloaded' (before decompress) event interface.
For this, I think I should remove bin-wrapper I see that is not well-maintained from dependencies.

Or I'll see if it's possible to expose before decompress event from bin-wrapper.

@XhmikosR
Copy link
Collaborator

@satoshun00: this might give you some ideas https://github.com/nikku/hugo-cli

@XhmikosR
Copy link
Collaborator

XhmikosR commented May 29, 2023

I rebased and updated https://github.com/fenneclab/hugo-bin/compare/feat/checksum and it works. My thoughts:

  1. I do believe that the checksum functionality should be in bin-wrapper. If someone provides a proper PR against my fork, we could move forward
  2. The checksums should be retrieved from GitHub so that we don't need to handle this ourselves here

Any help is welcome 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants