Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #34 from KusionStack/cdn-address
Browse files Browse the repository at this point in the history
chore: fix unavailbale cdn address
  • Loading branch information
elliotxx committed Sep 5, 2022
2 parents fae16b1 + 893c38b commit 64b03cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ build/
coverage.out
tmp/
__debug_bin
.vscode/
.vscode/
.idea/
8 changes: 4 additions & 4 deletions pkg/sources/cdn/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ var ErrUnsupportedOsArch = fmt.Errorf("unsupported os/arch: %s/%s", runtime.GOOS

func getArchiveDownloadURL(ver string) (string, error) {
archiveDownloadURLMap := map[string]string{
"linux-amd64": "https://gh.api.99988866.xyz/https://github.com/KusionStack/kusion/releases/download/%s/kusion-linux.tgz",
"darwin-amd64": "https://gh.api.99988866.xyz/https://github.com/KusionStack/kusion/releases/download/%s/kusion-darwin.tgz",
"darwin-arm64": "https://gh.api.99988866.xyz/https://github.com/KusionStack/kusion/releases/download/%s/kusion-darwin-arm64.tgz",
"windows-amd64": "https://gh.api.99988866.xyz/https://github.com/KusionStack/kusion/releases/download/%s/kusion-windows.tgz",
"linux-amd64": "https://ghproxy.com/https://github.com/KusionStack/kusion/releases/download/%s/kusion-linux.tgz",
"darwin-amd64": "https://ghproxy.com/https://github.com/KusionStack/kusion/releases/download/%s/kusion-darwin.tgz",
"darwin-arm64": "https://ghproxy.com/https://github.com/KusionStack/kusion/releases/download/%s/kusion-darwin-arm64.tgz",
"windows-amd64": "https://ghproxy.com/https://github.com/KusionStack/kusion/releases/download/%s/kusion-windows.tgz",
}

if urlPattern, ok := archiveDownloadURLMap[getOsArchKey(runtime.GOOS, runtime.GOARCH)]; ok {
Expand Down

0 comments on commit 64b03cf

Please sign in to comment.