1
0
Fork 0
forked from Kispi/Core
HGOE-SaS/webapp/scripts/generate-version.js
Simon Giesel 212e0bbcc3
All checks were successful
continuous-integration/drone/push Build is passing
fix(webapp): small fixes
2023-07-09 22:45:42 +02:00

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