Deac Karns
Deac Karns

Reputation: 1196

Homebrew tap formula update

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:

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

Answers (1)

Deac Karns
Deac Karns

Reputation: 1196

SOLVED

The problem was with the curl command.

The following command will output the correct sha256 checksum to put in the formula file.

Using Curl

curl -Ls https://address/0.0.9.tar.gz | shasum -a 256

Using wget

wget -qO- https://address/0.0.9.tar.gz | shasum -a 256

Upvotes: 4

Related Questions