Reputation: 1196
So I have a few homebrew packages that I maintain. When I release a tagged version of one of the packages, I have a cumbersome dance that I have to do in order for the whole process to work end to end. It is as follows:
URL
in my homebrew formula to the new tag
sha256
error I copy and paste the Actual
sha256 into the formula file and push it again up to github.Bellow is the error I get when I brew upgrade [package]
Error: SHA256 mismatch
Expected: f95ec88f22bd217271199695593f9a217cc0fc3b69469e31cafd09f0a55dc1a4
Actual: 3b52516206cdec8fd85f74c5d346665195fdef3095dc7665a680e48842edd5cf
I have tried to generate the sha256
locally before I commit the formula to github and it never matches:
shasum -a 256 [package]
I have tried downloading the tarball and issuing the same command on the tar.gz and it doesnt match either.
curl -O http://address/0.0.9.tar.gz
shasum -a 256 0.0.9.tar.gz
What gives? I am sick of doing this dance. There has to be a less cumbersome way that only involves me committing my formula file once.
Upvotes: 3
Views: 1322
Reputation: 1196
The problem was with the curl
command.
The following command will output the correct sha256
checksum to put in the formula file.
curl -Ls https://address/0.0.9.tar.gz | shasum -a 256
wget -qO- https://address/0.0.9.tar.gz | shasum -a 256
Upvotes: 4