Repository: goreleaser/goreleaser
Pull request #3277 (2022-08-02 17:46:08)

feat: support goarch=loong64
go 1.19 supports linux loong64: https://go.dev/doc/go1.19

codecov[bot]: # [Codecov](https://codecov.io/gh/goreleaser/goreleaser/pull/3277?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser) Report
> Merging [#3277](https://codecov.io/gh/goreleaser/goreleaser/pull/3277?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser) (6882555) into [main](https://codecov.io/gh/goreleaser/goreleaser/commit/a31b4aa0ae72a39258e327898819029001f400a3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser) (a31b4aa) will **not change** coverage.
> The diff coverage is `n/a`.

```diff
@@           Coverage Diff           @@
##             main    #3277   +/-   ##
=======================================
  Coverage   84.26%   84.26%           
=======================================
  Files         115      115           
  Lines        9302     9302           
=======================================
  Hits         7838     7838           
  Misses       1183     1183           
  Partials      281      281           
```


| [Impacted Files](https://codecov.io/gh/goreleaser/goreleaser/pull/3277?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser) | Coverage Δ | |
|---|---|---|
| [internal/builders/buildtarget/targets.go](https://codecov.io/gh/goreleaser/goreleaser/pull/3277/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser#diff-aW50ZXJuYWwvYnVpbGRlcnMvYnVpbGR0YXJnZXQvdGFyZ2V0cy5nbw==) | `100.00% <ø> (ø)` | |

Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser).


Patch:
diff --git a/Dockerfile b/Dockerfile
index cbf275db..8e88c9ad 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.18.5-alpine@sha256:dda10a0c69473a595ab11ed3f8305bf4d38e0436b80e1462fb22c9d8a1c1e808
+FROM golang:1.19.0-alpine@sha256:0e78fc17d9b4428bc6b9c07aa49c819541a99cd0c0121c4de9c68feecfea825b
 
 RUN apk add --no-cache bash \
 	curl \
diff --git a/internal/builders/buildtarget/targets.go b/internal/builders/buildtarget/targets.go
index de76dea6..9d66640e 100644
--- a/internal/builders/buildtarget/targets.go
+++ b/internal/builders/buildtarget/targets.go
@@ -169,6 +169,7 @@ var (
 		"linuxmips64le",
 		"linuxs390x",
 		"linuxriscv64",
+		"linuxloong64",
 		"netbsd386",
 		"netbsdamd64",
 		"netbsdarm",
@@ -217,6 +218,7 @@ var (
 		"s390x",
 		"wasm",
 		"riscv64",
+		"loong64",
 	}
 
 	validGoarm   = []string{"5", "6", "7"}


Test patch:
diff --git a/internal/builders/buildtarget/targets_test.go b/internal/builders/buildtarget/targets_test.go
index 4247a43d..d9034f26 100644
--- a/internal/builders/buildtarget/targets_test.go
+++ b/internal/builders/buildtarget/targets_test.go
@@ -31,6 +31,7 @@ func TestAllBuildTargets(t *testing.T) {
 			"mipsle",
 			"mips64le",
 			"riscv64",
+			"loong64",
 		},
 		Goarm: []string{
 			"6",
@@ -84,6 +85,7 @@ func TestAllBuildTargets(t *testing.T) {
 			"linux_mipsle_softfloat",
 			"linux_mips64le_hardfloat",
 			"linux_riscv64",
+			"linux_loong64",
 			"darwin_amd64_v1",
 			"darwin_amd64_v2",
 			"darwin_amd64_v4",
@@ -189,6 +191,7 @@ func TestGoosGoarchCombos(t *testing.T) {
 		{"linux", "ppc64le", true},
 		{"linux", "s390x", true},
 		{"linux", "riscv64", true},
+		{"linux", "loong64", true},
 		{"netbsd", "386", true},
 		{"netbsd", "amd64", true},
 		{"netbsd", "arm", true},