Commit 244138cd authored by Mathias Chouet's avatar Mathias Chouet :spaghetti:
Browse files

Preprocessor : added result of `git describe` to date_revision file

Showing with 6 additions and 3 deletions
+6 -3
......@@ -7,13 +7,16 @@ var fs = require('fs');
date_last_commit = require('child_process')
.execSync('git log -1 --format=%cd --date=short')
.toString().trim()
version = require('child_process')
.execSync('git describe')
.toString().trim()
var sFileName = "src/date_revision.ts";
fs.writeFile(sFileName, `export const jalhydDateRev = "${date_last_commit}";\n`, function(err) {
fs.writeFile(sFileName, `export const jalhydDateRev = "${date_last_commit}";\nexport const jalhydVersion = "${version}";\n`, function(err) {
if(err) {
return console.log(err);
}
console.log(`File ${sFileName} saved with date ${date_last_commit}`);
});
\ No newline at end of file
console.log(`File ${sFileName} saved with date ${date_last_commit}, version ${version}`);
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment