Skip to content

Commit

Permalink
yj: fix asset name
Browse files Browse the repository at this point in the history
  • Loading branch information
myhro committed Aug 3, 2024
1 parent a7a1aca commit 016b7dd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions tools/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,5 @@ func (t *Tool) AssetXh() {

func (t *Tool) AssetYj() {
t.Asset.IsBinary = true
t.Asset.Name = fmt.Sprintf("yj-%v", t.OS)

if t.Arch != "" {
t.Asset.Name += fmt.Sprintf("-%v", t.Arch)
}
t.Asset.Name = fmt.Sprintf("yj-%v-%v", t.OS, t.Arch)
}
2 changes: 1 addition & 1 deletion tools/asset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (s *AssetTestSuite) TestName() {
version: "v5.0.0",
arch: "amd64",
os: "linux",
filename: "yj-linux",
filename: "yj-linux-amd64",
},
}

Expand Down
4 changes: 2 additions & 2 deletions tools/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ var Arch = map[string]map[string]map[string]string{
},
Yj: {
"darwin": {
"amd64": "",
"amd64": "amd64",
},
"linux": {
"amd64": "",
"amd64": "amd64",
"arm64": "arm64",
},
},
Expand Down

0 comments on commit 016b7dd

Please sign in to comment.