extension-tools
Advanced tools
Comparing version 0.4.1 to 0.4.2
{ | ||
"name": "extension-tools", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "A collection of tools for automated publishing of browser extensions", | ||
@@ -5,0 +5,0 @@ "main": "exec.js", |
@@ -38,2 +38,4 @@ var child_process = require('child_process'); | ||
module.exports = exec; | ||
module.exports.CommandError = CommandError; | ||
@@ -15,5 +15,14 @@ #!/usr/bin/env node | ||
/// Returns the name of the currently checked-out Git branch or null | ||
/// if HEAD is not a Git branch. | ||
function gitBranch() { | ||
return exec('git', 'symbolic-ref', '--short', 'HEAD').then(function(result) { | ||
return exec('git', 'symbolic-ref', '--short', '--quiet', 'HEAD').then(function(result) { | ||
return result[0].trim(); | ||
}).catch(function(err) { | ||
if (err instanceof exec.CommandError && err.status == 1) { | ||
// detached HEAD, return null to represent an unknown branch | ||
return null; | ||
} else { | ||
throw err; | ||
} | ||
}); | ||
@@ -20,0 +29,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
28530
649