Skip to content

Commit

Permalink
Merge pull request #30 from mlocher/codeship
Browse files Browse the repository at this point in the history
Get the branch name out of the CI_BRANCH env variable if available.
  • Loading branch information
kevmoo committed May 20, 2015
2 parents 6e06fc7 + f111462 commit 098b24f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/src/git_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ class GitBranch {
{ProcessSystem processSystem: const ProcessSystem(),
Map<String, String> environment}) {
if (null == environment) environment = Platform.environment;
if (null != environment["CI_BRANCH"]) return environment[
"CI_BRANCH"];
if (null != environment["TRAVIS_BRANCH"]) return environment[
"TRAVIS_BRANCH"];
var args = ["rev-parse", "--abbrev-ref", "HEAD"];
Expand Down

0 comments on commit 098b24f

Please sign in to comment.