mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 21:33:06 +07:00
16 lines
336 B
JavaScript
16 lines
336 B
JavaScript
|
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()
|
||
|
},
|
||
|
}
|