Repository: goreleaser/goreleaser
Pull request #3237 (2022-07-13 08:14:30)

feat(deps): bump golang from 1.18.3-alpine to 1.18.4-alpine
Bumps golang from 1.18.3-alpine to 1.18.4-alpine.


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang&package-manager=docker&previous-version=1.18.3-alpine&new-version=1.18.4-alpine)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

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

```diff
@@           Coverage Diff           @@
##             main    #3237   +/-   ##
=======================================
  Coverage   84.29%   84.29%           
=======================================
  Files         115      115           
  Lines        9322     9322           
=======================================
  Hits         7858     7858           
  Misses       1183     1183           
  Partials      281      281           
```



------

[Continue to review full report at Codecov](https://codecov.io/gh/goreleaser/goreleaser/pull/3237?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/goreleaser/goreleaser/pull/3237?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser). Last update [3cf64c1...31d56e3](https://codecov.io/gh/goreleaser/goreleaser/pull/3237?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=goreleaser).


Patch:
diff --git a/Dockerfile b/Dockerfile
index 98502bae..f164bce3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.18.3-alpine@sha256:7cc62574fcf9c5fb87ad42a9789d5539a6a085971d58ee75dd2ee146cb8a8695
+FROM golang:1.18.4-alpine@sha256:46f1fa18ca1ec228f7ea4978ad717f0a8c5e51436e7b8efaf64011f7729886df
 
 RUN apk add --no-cache bash \
 	curl \
diff --git a/internal/builders/buildtarget/targets.go b/internal/builders/buildtarget/targets.go
index d30d5b4d..e4d07ceb 100644
--- a/internal/builders/buildtarget/targets.go
+++ b/internal/builders/buildtarget/targets.go
@@ -4,8 +4,6 @@ package buildtarget
 
 import (
 	"fmt"
-	"os"
-	"os/exec"
 	"strings"
 
 	"github.com/caarlos0/log"
@@ -25,14 +23,6 @@ func (t target) String() string {
 
 // List compiles the list of targets for the given builds.
 func List(build config.Build) ([]string, error) {
-	version, err := goVersion(build)
-	if err != nil {
-		return nil, err
-	}
-	return matrix(build, version)
-}
-
-func matrix(build config.Build, version []byte) ([]string, error) {
 	// nolint:prealloc
 	var targets []target
 	// nolint:prealloc
@@ -135,23 +125,6 @@ func ignored(build config.Build, target target) bool {
 	return false
 }
 
-func goVersion(build config.Build) ([]byte, error) {
-	cmd := exec.Command(build.GoBinary, "version")
-	// If the build.Dir is acessible, set the cmd dir to it in case
-	// of reletive path to GoBinary
-	if fileInfo, err := os.Stat(build.Dir); err == nil {
-		if !fileInfo.IsDir() {
-			return nil, fmt.Errorf("invalid builds.dir property, it should be a directory: %s", build.Dir)
-		}
-		cmd.Dir = build.Dir
-	}
-	bts, err := cmd.CombinedOutput()
-	if err != nil {
-		return nil, fmt.Errorf("unable to determine version of go binary (%s): %w", build.GoBinary, err)
-	}
-	return bts, nil
-}
-
 func valid(target target) bool {
 	return contains(target.os+target.arch, validTargets)
 }
diff --git a/internal/pipe/docker/manifest.go b/internal/pipe/docker/manifest.go
index b5e08329..0e5fe62c 100644
--- a/internal/pipe/docker/manifest.go
+++ b/internal/pipe/docker/manifest.go
@@ -15,7 +15,7 @@ import (
 	"github.com/goreleaser/goreleaser/pkg/context"
 )
 
-// ManifestPipe is beta implementation of for the docker manifest feature,
+// ManifestPipe is an implementation for the docker manifest feature,
 // allowing to publish multi-arch docker images.
 type ManifestPipe struct{}
 
diff --git a/www/docs/customization/docker_manifest.md b/www/docs/customization/docker_manifest.md
index f88df0e4..35341596 100644
--- a/www/docs/customization/docker_manifest.md
+++ b/www/docs/customization/docker_manifest.md
@@ -10,10 +10,6 @@ Notice that if you have something in the `docker_manifests` section in your
 config file, GoReleaser will add the manifest's to the release notes
 instead of the Docker images names.
 
-!!! warning
-    Please note that this is a beta feature, and it may change or be removed
-    at any time.
-
 !!! warning
     Notice that the images used in the manifest **need to be pushed** for this to work.
     This is a limitation of how `docker manifest create` works.
@@ -81,11 +77,11 @@ docker_manifests:
 We basically build and push our images as usual, but we also add a new
 section to our config defining which images are part of which manifests.
 
-GoReleaser will create and publish the manifest in its publish phase.
+GoReleaser will create and publish the manifest in its publishing phase.
 
 !!! warning
     Unfortunately, the manifest tool needs the images to be pushed to create
-    the manifest, that's why we both create and push it in the publish phase.
+    the manifest, that's why we both create and push it in the publishing phase.
 
 ## Example config
 


Test patch:
diff --git a/internal/builders/buildtarget/targets_test.go b/internal/builders/buildtarget/targets_test.go
index 9b4f8179..a2f11164 100644
--- a/internal/builders/buildtarget/targets_test.go
+++ b/internal/builders/buildtarget/targets_test.go
@@ -67,7 +67,7 @@ func TestAllBuildTargets(t *testing.T) {
 	}
 
 	t.Run("go 1.18", func(t *testing.T) {
-		result, err := matrix(build, []byte("go version go1.18.0"))
+		result, err := List(build)
 		require.NoError(t, err)
 		require.Equal(t, []string{
 			"linux_386",
@@ -111,46 +111,46 @@ func TestAllBuildTargets(t *testing.T) {
 	})
 
 	t.Run("invalid goos", func(t *testing.T) {
-		_, err := matrix(config.Build{
+		_, err := List(config.Build{
 			Goos:    []string{"invalid"},
 			Goarch:  []string{"amd64"},
 			Goamd64: []string{"v2"},
-		}, []byte("go version go1.18.0"))
+		})
 		require.EqualError(t, err, "invalid goos: invalid")
 	})
 
 	t.Run("invalid goarch", func(t *testing.T) {
-		_, err := matrix(config.Build{
+		_, err := List(config.Build{
 			Goos:   []string{"linux"},
 			Goarch: []string{"invalid"},
-		}, []byte("go version go1.18.0"))
+		})
 		require.EqualError(t, err, "invalid goarch: invalid")
 	})
 
 	t.Run("invalid goarm", func(t *testing.T) {
-		_, err := matrix(config.Build{
+		_, err := List(config.Build{
 			Goos:   []string{"linux"},
 			Goarch: []string{"arm"},
 			Goarm:  []string{"invalid"},
-		}, []byte("go version go1.18.0"))
+		})
 		require.EqualError(t, err, "invalid goarm: invalid")
 	})
 
 	t.Run("invalid gomips", func(t *testing.T) {
-		_, err := matrix(config.Build{
+		_, err := List(config.Build{
 			Goos:   []string{"linux"},
 			Goarch: []string{"mips"},
 			Gomips: []string{"invalid"},
-		}, []byte("go version go1.18.0"))
+		})
 		require.EqualError(t, err, "invalid gomips: invalid")
 	})
 
 	t.Run("invalid goamd64", func(t *testing.T) {
-		_, err := matrix(config.Build{
+		_, err := List(config.Build{
 			Goos:    []string{"linux"},
 			Goarch:  []string{"amd64"},
 			Goamd64: []string{"invalid"},
-		}, []byte("go version go1.18.0"))
+		})
 		require.EqualError(t, err, "invalid goamd64: invalid")
 	})
 }
@@ -236,25 +236,4 @@ func TestList(t *testing.T) {
 		require.NoError(t, err)
 		require.Equal(t, []string{"linux_amd64_v2"}, targets)
 	})
-
-	t.Run("error with dir", func(t *testing.T) {
-		_, err := List(config.Build{
-			Goos:     []string{"linux"},
-			Goarch:   []string{"amd64"},
-			Goamd64:  []string{"v2"},
-			GoBinary: "go",
-			Dir:      "targets.go",
-		})
-		require.EqualError(t, err, "invalid builds.dir property, it should be a directory: targets.go")
-	})
-
-	t.Run("fail", func(t *testing.T) {
-		_, err := List(config.Build{
-			Goos:     []string{"linux"},
-			Goarch:   []string{"amd64"},
-			Goamd64:  []string{"v2"},
-			GoBinary: "nope",
-		})
-		require.EqualError(t, err, `unable to determine version of go binary (nope): exec: "nope": executable file not found in $PATH`)
-	})
 }