Skip to content

Commit

Permalink
Fix renamed org for sops
Browse files Browse the repository at this point in the history
sops was moved from mozilla to "getsops"

Thanks to @mkimberley for reporting it

Fixes: #949

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Jul 5, 2023
1 parent 3a36fb5 commit cf1d174
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func FindGitHubRelease(owner, repo string) (string, error) {
defer res.Body.Close()
}

if res.StatusCode != 302 {
if res.StatusCode != http.StatusMovedPermanently && res.StatusCode != http.StatusFound {
return "", fmt.Errorf("server returned status: %d", res.StatusCode)
}

Expand Down
10 changes: 5 additions & 5 deletions pkg/get/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3614,31 +3614,31 @@ func Test_DownloadSOPS(t *testing.T) {
os: "linux",
arch: arch64bit,
version: version,
url: "https://github.com/mozilla/sops/releases/download/v3.7.2/sops-v3.7.2.linux.amd64",
url: "https://github.com/getsops/sops/releases/download/v3.7.2/sops-v3.7.2.linux.amd64",
},
{
os: "linux",
arch: archARM64,
version: version,
url: "https://github.com/mozilla/sops/releases/download/v3.7.2/sops-v3.7.2.linux.arm64",
url: "https://github.com/getsops/sops/releases/download/v3.7.2/sops-v3.7.2.linux.arm64",
},
{
os: "darwin",
arch: arch64bit,
version: version,
url: "https://github.com/mozilla/sops/releases/download/v3.7.2/sops-v3.7.2.darwin.amd64",
url: "https://github.com/getsops/sops/releases/download/v3.7.2/sops-v3.7.2.darwin.amd64",
},
{
os: "darwin",
arch: archARM64,
version: version,
url: "https://github.com/mozilla/sops/releases/download/v3.7.2/sops-v3.7.2.darwin.arm64",
url: "https://github.com/getsops/sops/releases/download/v3.7.2/sops-v3.7.2.darwin.arm64",
},
{
os: "ming",
arch: arch64bit,
version: version,
url: "https://github.com/mozilla/sops/releases/download/v3.7.2/sops-v3.7.2.exe",
url: "https://github.com/getsops/sops/releases/download/v3.7.2/sops-v3.7.2.exe",
},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/get/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -2265,7 +2265,7 @@ https://github.com/{{.Owner}}/{{.Repo}}/releases/download/{{.Version}}/{{.Name}}
})
tools = append(tools,
Tool{
Owner: "mozilla",
Owner: "getsops",
Repo: "sops",
Name: "sops",
Description: "Simple and flexible tool for managing secrets",
Expand Down

0 comments on commit cf1d174

Please sign in to comment.