My solution: I wrote a plugin for webpack
var GitDescribePlugin = function(/*options*/) {
};
GitDescribePlugin.prototype.apply = function(compiler) {
compiler.plugin("compile", function(/*params*/) {
console.log("The compiler is starting to compile...");
child_process.execSync('git describe --always > gitdescribe.txt');
});
};
source
share