setup-php/node_modules/codecov/lib/git.js

16 lines
336 B
JavaScript
Raw Normal View History

2019-09-20 09:41:20 +07:00
var execSync = require('child_process').execSync
module.exports = {
branch: function() {
return execSync('git rev-parse --abbrev-ref HEAD || hg branch')
.toString()
.trim()
},
head: function() {
return execSync("git log -1 --pretty=%H || hg id -i --debug | tr -d '+'")
.toString()
.trim()
},
}