mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-04-13 11:50:34 +02:00
feat(scoop): support arm64 (#4193)
adds arm64 support to scoops. Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
dbcebd00ae
commit
58a6ba4e30
@ -40,7 +40,7 @@ func (e ErrIncorrectArchiveCount) Error() string {
|
|||||||
_, _ = b.WriteString(fmt.Sprintf("but found %d archives ", len(e.archives)))
|
_, _ = b.WriteString(fmt.Sprintf("but found %d archives ", len(e.archives)))
|
||||||
}
|
}
|
||||||
|
|
||||||
_, _ = b.WriteString(fmt.Sprintf("matching the given filters: goos=windows goarch=[386 amd64] goamd64=%s ids=%s", e.goamd64, e.ids))
|
_, _ = b.WriteString(fmt.Sprintf("matching the given filters: goos=windows goarch=[386 amd64 arm64] goamd64=%s ids=%s", e.goamd64, e.ids))
|
||||||
|
|
||||||
if len(e.archives) > 0 {
|
if len(e.archives) > 0 {
|
||||||
names := make([]string, 0, len(e.archives))
|
names := make([]string, 0, len(e.archives))
|
||||||
@ -129,6 +129,7 @@ func doRun(ctx *context.Context, scoop config.Scoop, cl client.ReleaserURLTempla
|
|||||||
artifact.ByGoarch("amd64"),
|
artifact.ByGoarch("amd64"),
|
||||||
artifact.ByGoamd64(scoop.Goamd64),
|
artifact.ByGoamd64(scoop.Goamd64),
|
||||||
),
|
),
|
||||||
|
artifact.ByGoarch("arm64"),
|
||||||
artifact.ByGoarch("386"),
|
artifact.ByGoarch("386"),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
@ -342,6 +343,8 @@ func dataFor(ctx *context.Context, scoop config.Scoop, cl client.ReleaserURLTemp
|
|||||||
arch = "32bit"
|
arch = "32bit"
|
||||||
case "amd64":
|
case "amd64":
|
||||||
arch = "64bit"
|
arch = "64bit"
|
||||||
|
case "arm64":
|
||||||
|
arch = "arm64"
|
||||||
default:
|
default:
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -132,6 +132,7 @@ func Test_doRun(t *testing.T) {
|
|||||||
},
|
},
|
||||||
[]artifact.Artifact{
|
[]artifact.Artifact{
|
||||||
{Name: "foo_1.0.1_windows_amd64.tar.gz", Goos: "windows", Goarch: "amd64", Goamd64: "v1", Path: file},
|
{Name: "foo_1.0.1_windows_amd64.tar.gz", Goos: "windows", Goarch: "amd64", Goamd64: "v1", Path: file},
|
||||||
|
{Name: "foo_1.0.1_windows_arm64.tar.gz", Goos: "windows", Goarch: "arm64", Path: file},
|
||||||
{Name: "foos_1.0.1_windows_amd64.tar.gz", Goos: "windows", Goarch: "amd64", Goamd64: "v1", Path: file},
|
{Name: "foos_1.0.1_windows_amd64.tar.gz", Goos: "windows", Goarch: "amd64", Goamd64: "v1", Path: file},
|
||||||
},
|
},
|
||||||
func(tb testing.TB, err error) {
|
func(tb testing.TB, err error) {
|
||||||
@ -140,6 +141,7 @@ func Test_doRun(t *testing.T) {
|
|||||||
goamd64: "v1",
|
goamd64: "v1",
|
||||||
archives: []*artifact.Artifact{
|
archives: []*artifact.Artifact{
|
||||||
{Name: "foo_1.0.1_windows_amd64.tar.gz"},
|
{Name: "foo_1.0.1_windows_amd64.tar.gz"},
|
||||||
|
{Name: "foo_1.0.1_windows_arm64.tar.gz"},
|
||||||
{Name: "foos_1.0.1_windows_amd64.tar.gz"},
|
{Name: "foos_1.0.1_windows_amd64.tar.gz"},
|
||||||
},
|
},
|
||||||
}.Error())
|
}.Error())
|
||||||
@ -939,6 +941,18 @@ func Test_buildManifest(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "foo_1.0.1_windows_arm64.tar.gz",
|
||||||
|
Goos: "windows",
|
||||||
|
Goarch: "arm64",
|
||||||
|
Path: file,
|
||||||
|
Extra: map[string]interface{}{
|
||||||
|
artifact.ExtraBinaries: []string{
|
||||||
|
"foo.exe",
|
||||||
|
"bar.exe",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Name: "foo_1.0.1_windows_386.tar.gz",
|
Name: "foo_1.0.1_windows_386.tar.gz",
|
||||||
Goos: "windows",
|
Goos: "windows",
|
||||||
|
@ -16,6 +16,14 @@
|
|||||||
"bar.exe"
|
"bar.exe"
|
||||||
],
|
],
|
||||||
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
||||||
|
},
|
||||||
|
"arm64": {
|
||||||
|
"url": "https://github.com/test/test/releases/download/v1.0.1/foo_1.0.1_windows_arm64.tar.gz",
|
||||||
|
"bin": [
|
||||||
|
"foo.exe",
|
||||||
|
"bar.exe"
|
||||||
|
],
|
||||||
|
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/goreleaser",
|
"homepage": "https://github.com/goreleaser",
|
||||||
|
@ -16,6 +16,14 @@
|
|||||||
"bar.exe"
|
"bar.exe"
|
||||||
],
|
],
|
||||||
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
||||||
|
},
|
||||||
|
"arm64": {
|
||||||
|
"url": "http://gitlab.mycompany.com/foo/bar/-/releases/v1.0.1/downloads/foo_1.0.1_windows_arm64.tar.gz",
|
||||||
|
"bin": [
|
||||||
|
"foo.exe",
|
||||||
|
"bar.exe"
|
||||||
|
],
|
||||||
|
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"homepage": "https://gitlab.com/goreleaser",
|
"homepage": "https://gitlab.com/goreleaser",
|
||||||
|
@ -16,6 +16,14 @@
|
|||||||
"bar.exe"
|
"bar.exe"
|
||||||
],
|
],
|
||||||
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
||||||
|
},
|
||||||
|
"arm64": {
|
||||||
|
"url": "https://github.com/test/test/releases/download/v1.0.1/foo_1.0.1_windows_arm64.tar.gz",
|
||||||
|
"bin": [
|
||||||
|
"foo.exe",
|
||||||
|
"bar.exe"
|
||||||
|
],
|
||||||
|
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/goreleaser",
|
"homepage": "https://github.com/goreleaser",
|
||||||
|
@ -16,6 +16,14 @@
|
|||||||
"bar.exe"
|
"bar.exe"
|
||||||
],
|
],
|
||||||
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
||||||
|
},
|
||||||
|
"arm64": {
|
||||||
|
"url": "http://github.mycompany.com/foo/bar/v1.0.1/foo_1.0.1_windows_arm64.tar.gz",
|
||||||
|
"bin": [
|
||||||
|
"foo.exe",
|
||||||
|
"bar.exe"
|
||||||
|
],
|
||||||
|
"hash": "5e2bf57d3f40c4b6df69daf1936cb766f832374b4fc0259a7cbff06e2f70f269"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/goreleaser",
|
"homepage": "https://github.com/goreleaser",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user