1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-29 01:44:39 +02:00

feat(winget): support arm64

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2023-06-15 03:34:12 +00:00
parent 7355ccd524
commit 0f5b058363
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
10 changed files with 105 additions and 1 deletions

View File

@ -119,4 +119,5 @@ type Locale struct {
var fromGoArch = map[string]string{
"amd64": "x64",
"386": "x86",
"arm64": "arm64",
}

View File

@ -13,5 +13,19 @@ Installers:
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_amd64v1.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: x86
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_386.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: arm64
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_arm64.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
ManifestType: installer
ManifestVersion: 1.4.0

View File

@ -13,5 +13,19 @@ Installers:
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_amd64v1.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: x86
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_386.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: arm64
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_arm64.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
ManifestType: installer
ManifestVersion: 1.4.0

View File

@ -13,5 +13,19 @@ Installers:
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_amd64v1.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: x86
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_386.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: arm64
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_arm64.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
ManifestType: installer
ManifestVersion: 1.4.0

View File

@ -13,5 +13,19 @@ Installers:
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_amd64v1.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: x86
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_386.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: arm64
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_arm64.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
ManifestType: installer
ManifestVersion: 1.4.0

View File

@ -13,5 +13,19 @@ Installers:
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_amd64v1.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: x86
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_386.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: arm64
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_arm64.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
ManifestType: installer
ManifestVersion: 1.4.0

View File

@ -13,5 +13,19 @@ Installers:
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_amd64v1.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: x86
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_386.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: arm64
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_arm64.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
ManifestType: installer
ManifestVersion: 1.4.0

View File

@ -13,5 +13,19 @@ Installers:
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_amd64v1.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: x86
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo\foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_386.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
- Architecture: arm64
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: foo\foo.exe
InstallerUrl: https://dummyhost/download/v1.2.1/foo_windows_arm64.zip
InstallerSha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
UpgradeBehavior: uninstallPrevious
ManifestType: installer
ManifestVersion: 1.4.0

View File

@ -196,6 +196,7 @@ func (p Pipe) doRun(ctx *context.Context, winget config.Winget, cl client.Releas
artifact.ByType(artifact.UploadableArchive),
artifact.Or(
artifact.ByGoarch("386"),
artifact.ByGoarch("arm64"),
artifact.And(
artifact.ByGoamd64(winget.Goamd64),
artifact.ByGoarch("amd64"),

View File

@ -508,7 +508,11 @@ func TestRunPipe(t *testing.T) {
createFakeArtifact("foo", goos, goarch, "v1", "", nil)
createFakeArtifact("wrapped-in-dir", goos, goarch, "v1", "", map[string]any{artifact.ExtraWrappedIn: "foo"})
goarch = "3864"
goarch = "386"
createFakeArtifact("foo", goos, goarch, "", "", nil)
createFakeArtifact("wrapped-in-dir", goos, goarch, "", "", map[string]any{artifact.ExtraWrappedIn: "foo"})
goarch = "arm64"
createFakeArtifact("foo", goos, goarch, "", "", nil)
createFakeArtifact("wrapped-in-dir", goos, goarch, "", "", map[string]any{artifact.ExtraWrappedIn: "foo"})