2019-04-09 03:28:07 +00:00
|
|
|
const fs = require('fs');
|
|
|
|
|
|
|
|
exports.setVersion = function() {
|
|
|
|
let revision = require('child_process')
|
|
|
|
.execSync('git describe --tags --long')
|
|
|
|
.toString().trim();
|
|
|
|
let line = `export let version: string = "${revision}";`;
|
|
|
|
fs.writeFileSync("./src/version.ts", line);
|
|
|
|
}
|
2019-04-10 18:10:57 +00:00
|
|
|
|
|
|
|
this.setVersion()
|