-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
versionFile.js
18 lines (14 loc) · 847 Bytes
/
versionFile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const path = require('path');
const fs = require('fs');
const appVersion = require('./package.json').version;
const frontendVersionFilePath = path.join(__dirname + '/frontend/version.js');
const backendVersionFilePath = path.join(__dirname + '/backend/version.js');
const eddnListenerVersionFilePath = path.join(__dirname + '/eddn_listener/version.js');
const guildBotVersionFilePath = path.join(__dirname + '/guild_bot/version.js');
const tickListenerVersionFilePath = path.join(__dirname + '/tick_listener/version.js');
const nodeSrc = `module.exports = '${appVersion}'\n`;
fs.writeFileSync(frontendVersionFilePath, nodeSrc);
fs.writeFileSync(backendVersionFilePath, nodeSrc);
fs.writeFileSync(eddnListenerVersionFilePath, nodeSrc);
fs.writeFileSync(guildBotVersionFilePath, nodeSrc);
fs.writeFileSync(tickListenerVersionFilePath, nodeSrc);