From eccb9d8f7d8f50e10b09db53bb455ee65d06b80c Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Mon, 16 Nov 2020 15:10:56 -0500 Subject: [PATCH] Ignore github ref --- cmd/common.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/common.go b/cmd/common.go index d5c7349..57bc38e 100644 --- a/cmd/common.go +++ b/cmd/common.go @@ -275,12 +275,12 @@ func (cmd *BaseCommand) GetCurrentBranch() string { } else if val, found := os.LookupEnv("TRAVIS_BRANCH"); found && val != "" { branchName = val cmd.Infof("got branch name=%v from environment variable=TRAVIS_BRANCH\n", branchName) - } else if val, found := os.LookupEnv("GITHUB_REF"); found && val != "" { - branchName = val - if strings.HasPrefix(branchName, "refs/heads/") { - branchName = strings.TrimPrefix(branchName, "refs/heads/") - } - cmd.Infof("got branch name=%v from environment variable=GITHUB_REF\n", branchName) + //} else if val, found := os.LookupEnv("GITHUB_REF"); found && val != "" { + // branchName = val + // if strings.HasPrefix(branchName, "refs/heads/") { + // branchName = strings.TrimPrefix(branchName, "refs/heads/") + // } + // cmd.Infof("got branch name=%v from environment variable=GITHUB_REF\n", branchName) } else { branchName = cmd.GetCmdOutputOneLine("get git branch (rev-parse)", "git", "rev-parse", "--abbrev-ref", "HEAD") if branchName == "HEAD" {