UNPKG

npm-git-library-version

Version:

Script for validating, versioning and tagging an npm release

12 lines (9 loc) 266 B
var exec; exec = require('../util/exec'); module.exports = function(branch) { return exec('git rev-parse --abbrev-ref HEAD').then(function(out) { if (out.trim() !== branch) { throw new Error("HEAD is not \"" + branch + "\""); } }); };