const fs = require('fs')

const gitHEAD = fs.readFileSync('.git/HEAD', 'utf-8').trim()
console.log(gitHEAD)
const ref = gitHEAD.split(': ')[1]
console.log(ref)
const gitVersion = fs.readFileSync(`.git/${ref}`, 'utf-8').trim()
console.log(gitVersion)
const gitCommitVersion = `${ref}: ${gitVersion}`

module.exports = gitCommitVersion

@@ -84,33 +84,10 @@
 m()%0A
-console.log(gitHEAD)%0Acons
+le
 t re
@@ -117,195 +117,186 @@
 %5B1%5D%0A
-console.log(ref)%0Aconst gitVersion = fs.readFileSync(%60.git/$%7Bref%7D%60, 'utf-8').trim()%0Aconsole.log(gitVersion)%0Aconst gitCommitVersion = %60$%7Bref%7D: $%7BgitVersion%7D%60%0A%0Amodule.exports = gitCommitVersion
+let gitVersion%0Aif (!ref) %7B%0A  ref = 'travis'%0A  gitVersion = gitHEAD%0A%7D else %7B%0A  gitVersion = fs.readFileSync(%60.git/$%7Bref%7D%60, 'utf-8').trim()%0A%7D%0A%0Amodule.exports = %60$%7Bref%7D: $%7BgitVersion%7D%60
 %0A

fix travis publish