Skip to content

Commit

Permalink
feat(travis): ignore default branch check
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwitzko committed May 24, 2017
1 parent 7f565f0 commit 153977b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion condition/travis.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func Travis(token, defaultBranch string, private bool) error {
if os.Getenv("TRAVIS_TAG") != "" {
return errors.New("This test run was triggered by a git tag and therefore a new version won’t be published.")
}
if branch := os.Getenv("TRAVIS_BRANCH"); branch != defaultBranch {
if branch := os.Getenv("TRAVIS_BRANCH"); defaultBranch != "*" && branch != defaultBranch {
return fmt.Errorf("This test run was triggered on the branch %s, while semantic-release is configured to only publish from %s.", branch, defaultBranch)
}
if !strings.HasSuffix(os.Getenv("TRAVIS_JOB_NUMBER"), ".1") {
Expand Down

0 comments on commit 153977b

Please sign in to comment.