forked from Kispi/Core
Simon Giesel
212e0bbcc3
All checks were successful
continuous-integration/drone/push Build is passing
9 lines
No EOL
359 B
JavaScript
9 lines
No EOL
359 B
JavaScript
const fs = require('fs');
|
|
const packageJson = require('../package.json');
|
|
|
|
const version = `${packageJson.version}+${fs.readFileSync('../.git/refs/heads/master').toString().trim().substring(0, 7)}`;
|
|
|
|
// eslint-disable-next-line no-console
|
|
console.log(`Writing version ${version} to local .env file.`);
|
|
|
|
fs.writeFileSync('.env', `VITE_APP_VERSION=${version}`); |