diff --git a/cmd/drone-docker/main.go b/cmd/drone-docker/main.go index a142cc4..b993bb9 100644 --- a/cmd/drone-docker/main.go +++ b/cmd/drone-docker/main.go @@ -248,8 +248,8 @@ func run(c *cli.Context) error { if c.Bool("tags.auto") { plugin.Build.Tags = docker.DefaultTagSuffix( c.String("commit.ref"), - c.String("tags.suffix"), c.String("repo.branch"), + c.String("tags.suffix"), ) } diff --git a/tags.go b/tags.go index d83821a..5f33e95 100644 --- a/tags.go +++ b/tags.go @@ -9,7 +9,7 @@ import ( // DefaultTagSuffix returns a set of default suggested tags // based on the commit ref with an attached suffix. -func DefaultTagSuffix(ref, suffix, defaultBranch string) []string { +func DefaultTagSuffix(ref, defaultBranch, suffix string) []string { tags := DefaultTags(ref, defaultBranch) if len(suffix) == 0 { return tags diff --git a/tags_test.go b/tags_test.go index 30732a5..709b6ba 100644 --- a/tags_test.go +++ b/tags_test.go @@ -109,7 +109,7 @@ func TestDefaultTagSuffix(t *testing.T) { } for _, test := range tests { - got, want := DefaultTagSuffix(test.Before, test.Suffix, test.DefaultBranch), test.After + got, want := DefaultTagSuffix(test.Before, test.DefaultBranch, test.Suffix), test.After if !reflect.DeepEqual(got, want) { t.Errorf("Got tag %v, want %v", got, want) }