gitflow-helper-maven-plugin icon indicating copy to clipboard operation
gitflow-helper-maven-plugin copied to clipboard

gitBranchExpression should override local git branch if provided

Open impulse-jprice opened this issue 7 years ago • 2 comments

We were using gitBranchExpression to provide the git branch name via environment variables, intending to override the git branch name as can be detected via the git metadata on the filesystem. Since the addition of detecting the git branch name from the local git metadata was added the use of the environment variable seems to have been dropped.

This PR restores that behavior. Now if the environment variable resolves to some string that doesn't contain any additional replacement characters (${ }) it will be used, even if the local git metadata could provide a branch name. The actual git branch name will only be used if the gitBranchExpression is not provided, or doesn't fully resolve.

impulse-jprice avatar Oct 04 '18 13:10 impulse-jprice

Pull Request Test Coverage Report for Build 379

  • 10 of 16 (62.5%) changed or added relevant lines in 1 file are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-1.1%) to 72.09%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/main/java/com/e_gineering/maven/gitflowhelper/ScmUtils.java 10 16 62.5%
<!-- Total: 10 16
Files with Coverage Reduction New Missed Lines %
src/main/java/com/e_gineering/maven/gitflowhelper/PlexusLoggerToMavenLog.java 2 19.35%
src/main/java/com/e_gineering/maven/gitflowhelper/ScmUtils.java 5 30.97%
<!-- Total: 7
Totals Coverage Status
Change from base Build 377: -1.1%
Covered Lines: 576
Relevant Lines: 799

💛 - Coveralls

coveralls avatar Oct 04 '18 13:10 coveralls

To clarify: This is a question of priority, correct?

You're wanting the environment variable to override whatever would be detected from the git metadata.

That seems reasonable. Any chance I can talk you into providing test cases to enforce this semantic?

bvarner avatar Oct 05 '18 22:10 bvarner