-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage-script.js
More file actions
22 lines (18 loc) · 938 Bytes
/
package-script.js
File metadata and controls
22 lines (18 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
'use strict';
const fs = require('fs');
/**
* The purpose of this script is to sync the pakage.json version across all 4 packages, core, win, mac, and linux
**/
const mainPkg = JSON.parse(fs.readFileSync('./package.json'));
const macPkg = JSON.parse(fs.readFileSync('./package.mac.json'));
const linuxPkg = JSON.parse(fs.readFileSync('./package.linux.json'));
const winPkg = JSON.parse(fs.readFileSync('./package.win.json'));
const corePkg = JSON.parse(fs.readFileSync('./package.core.json'));
macPkg.version = mainPkg.version;
linuxPkg.version = mainPkg.version;
winPkg.version = mainPkg.version;
corePkg.version = mainPkg.version;
fs.writeFileSync('./package.mac.json', JSON.stringify(macPkg, null, 2));
fs.writeFileSync('./package.linux.json', JSON.stringify(linuxPkg, null, 2));
fs.writeFileSync('./package.win.json', JSON.stringify(winPkg, null, 2));
fs.writeFileSync('./package.core.json', JSON.stringify(corePkg, null, 2));