lemmy/ui/set_version.js
2019-04-08 20:28:07 -07:00

9 lines
280 B
JavaScript

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);
}