From f11146238d77e13d63cffce03154918362ba40b9 Mon Sep 17 00:00:00 2001 From: Marko Locher Date: Wed, 20 May 2015 19:02:21 +0200 Subject: [PATCH] Get the branch name out of the CI_BRANCH env variable if available. --- lib/src/git_data.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/git_data.dart b/lib/src/git_data.dart index 52143e5..27ae95e 100644 --- a/lib/src/git_data.dart +++ b/lib/src/git_data.dart @@ -131,6 +131,8 @@ class GitBranch { {ProcessSystem processSystem: const ProcessSystem(), Map 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"];