forked from cebindani/ugla
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.js
More file actions
36 lines (31 loc) · 821 Bytes
/
version.js
File metadata and controls
36 lines (31 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
'use strict';
const fs = require('fs-extra');
const packageProject = require('./projects/ugla/package.json');
const packageWorkspace = require('./package.json');
/**
* Set config file
*/
module.exports.changeConfig = function() {
fs.writeFileSync(
'./projects/ugla/src/lib/config.ts',
`export const VERSION = '${packageProject.version}';\n`,
{ encoding: 'utf-8' }
);
}
/**
* Change version
*/
module.exports.changeVersion = function(version) {
packageProject.version = `${version}`;
packageWorkspace.version = `${version}`;
fs.writeFileSync(
'./projects/ugla/package.json',
JSON.stringify(packageProject, null, 2) + '\n',
{ encoding: 'utf-8' }
);
fs.writeFileSync(
'./package.json',
JSON.stringify(packageWorkspace, null, 2) + '\n',
{ encoding: 'utf-8' }
);
}