Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2017-11-06 15:37:19 +08:00
parent 197b737685
commit 3c1cfa628f
2 changed files with 2 additions and 4 deletions

View File

@ -200,7 +200,7 @@ func main() {
},
cli.StringFlag{
Name: "default.branch",
Usage: "defualt repository branch",
Usage: "repository default branch",
EnvVar: "DRONE_REPO_BRANCH",
},
}

View File

@ -28,9 +28,7 @@ func DefaultTagSuffix(ref, suffix, commitBranch, defaultBranch string) []string
// the commit ref.
func DefaultTags(ref, commitBranch, defaultBranch string) []string {
if defaultBranch != "" &&
commitBranch != defaultBranch &&
!strings.HasPrefix(ref, "refs/tags/") {
if defaultBranch != "" && commitBranch != defaultBranch && !strings.HasPrefix(ref, "refs/tags/") {
return []string{}
}