Skip to content

Commit

Permalink
reverse the orderin
Browse files Browse the repository at this point in the history
Signed-off-by: Bo-Yi Wu <[email protected]>
  • Loading branch information
appleboy committed Nov 9, 2017
1 parent 0927e34 commit ff05dfd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/drone-docker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
)
}

Expand Down
2 changes: 1 addition & 1 deletion tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit ff05dfd

Please sign in to comment.