Fix SHA256 download: follow redirects (#132)

fixes #131

It looks like something in the hosting of dl.gitea.io has changed (@Owners please confirm?), so that requests are redirected to `https://storage.gitea.io/gitea-artifacts/...`
The binary downloads are not affected, as `wget` is used which follows redirects by default.

edit: Is the redirect URI the new canonical location? In that case it would make more sense to update the base URL instead..

Reviewed-on: https://gitea.com/gitea/homebrew-gitea/pulls/132
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
Norwin 2021-06-19 00:08:06 +08:00 committed by techknowlogick
parent f0e1c33ff8
commit 1a1827ae91
2 changed files with 4 additions and 4 deletions

View File

@ -22,13 +22,13 @@ class Gitea < Formula
stable do
version "1.14.2"
url Gitea.bin_url(version)
sha256 `curl -s #{url}.sha256`.split(" ").first
sha256 `curl -sL #{url}.sha256`.split(" ").first
end
head do
version "master"
url Gitea.bin_url(version)
sha256 `curl -s #{url}.sha256`.split(" ").first
sha256 `curl -sL #{url}.sha256`.split(" ").first
end
head do

4
tea.rb
View File

@ -7,13 +7,13 @@ class Tea < Formula
stable do
version "0.7.0"
url "https://dl.gitea.io/tea/#{version}/tea-#{version}-darwin-amd64"
sha256 `curl -s https://dl.gitea.io/tea/#{version}/tea-#{version}-darwin-amd64.sha256`.split(" ").first
sha256 `curl -sL https://dl.gitea.io/tea/#{version}/tea-#{version}-darwin-amd64.sha256`.split(" ").first
end
head do
version "master"
url "https://dl.gitea.io/tea/master/tea-master-darwin-amd64"
sha256 `curl -s https://dl.gitea.io/tea/master/tea-master-darwin-amd64.sha256`.split(" ").first
sha256 `curl -sL https://dl.gitea.io/tea/master/tea-master-darwin-amd64.sha256`.split(" ").first
end
head do