-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrelease.js
More file actions
32 lines (20 loc) · 748 Bytes
/
release.js
File metadata and controls
32 lines (20 loc) · 748 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
const git = require('simple-git');
const { execSync } = require('child_process');
(async function() {
await execSync('npm i types-directory@latest');
await execSync('npm run build');
const files = await git().status();
if (files.modified.includes('package.json')) {
await git().addConfig('user.email', 'dhruvjainpenny@gmail.com');
await git().addConfig('user.name', 'maddhruv');
await git().add('./*');
console.log('GIT ADD');
await git().commit(':new_moon_with_face: update package');
console.log('GIT committed');
console.log(require('./package.json').version);
await execSync('npm version minor');
console.log(require('./package.json').version);
} else {
process.exit(1);
}
})();