You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-11-06 09:09:29 +02:00
refactor: pointer to artifact (#1110)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9c675218ad
commit
b477ffa095
@@ -82,7 +82,7 @@ func (t *Template) WithEnv(e map[string]string) *Template {
|
||||
}
|
||||
|
||||
// WithArtifact populates fields from the artifact and replacements
|
||||
func (t *Template) WithArtifact(a artifact.Artifact, replacements map[string]string) *Template {
|
||||
func (t *Template) WithArtifact(a *artifact.Artifact, replacements map[string]string) *Template {
|
||||
var bin = a.Extra[binary]
|
||||
if bin == nil {
|
||||
bin = t.fields[projectName]
|
||||
|
||||
@@ -45,7 +45,7 @@ func TestWithArtifact(t *testing.T) {
|
||||
t.Run(expect, func(tt *testing.T) {
|
||||
tt.Parallel()
|
||||
result, err := New(ctx).WithArtifact(
|
||||
artifact.Artifact{
|
||||
&artifact.Artifact{
|
||||
Name: "not-this-binary",
|
||||
Goarch: "amd64",
|
||||
Goos: "linux",
|
||||
@@ -64,7 +64,7 @@ func TestWithArtifact(t *testing.T) {
|
||||
t.Run("artifact without binary name", func(tt *testing.T) {
|
||||
tt.Parallel()
|
||||
result, err := New(ctx).WithArtifact(
|
||||
artifact.Artifact{
|
||||
&artifact.Artifact{
|
||||
Name: "another-binary",
|
||||
Goarch: "amd64",
|
||||
Goos: "linux",
|
||||
|
||||
Reference in New Issue
Block a user