Comparing version 1.7.1 to 1.7.2
@@ -20,3 +20,9 @@ const execa = require('execa'); | ||
try { | ||
return execa.sync('git', ['rev-parse', '--abbrev-ref', 'HEAD']).stdout; | ||
const branch = execa | ||
.sync('git', ['show', '-s', '--pretty=%d', 'HEAD']) | ||
.stdout.match(/\(?(.*)\)?/)[1] | ||
.split(', ') | ||
.find(branch => branch.startsWith('origin/')); | ||
return branch ? branch.match(/^origin\/(.+)/)[1] : execa.sync('git', ['rev-parse', '--abbrev-ref', 'HEAD']).stdout; | ||
} catch (err) { | ||
@@ -23,0 +29,0 @@ return undefined; |
{ | ||
"name": "env-ci", | ||
"description": "Get environment variables exposed by CI services", | ||
"version": "1.7.1", | ||
"version": "1.7.2", | ||
"author": "Pierre Vanduynslager (https://github.com/pvdlg)", | ||
@@ -16,2 +16,3 @@ "bugs": { | ||
"codecov": "^3.0.0", | ||
"file-url": "^2.0.2", | ||
"nyc": "^11.1.0", | ||
@@ -18,0 +19,0 @@ "semantic-release": "^15.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21533
388
7