forked from uport-project/uport-connect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprwrapper.js
31 lines (26 loc) · 910 Bytes
/
prwrapper.js
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
const publishRelease = require('publish-release')
const exec = require('child_process').exec
// Get the latest tags just generated by semantic release from github
exec('git fetch', function (err, stdout) {
if (err) throw err
// Get latest tag
exec('git tag', function (err, stdout) {
if (err) throw err
const tags = stdout.split('\n').filter(function (tag) { return tag !== '' }).reverse()
const latestTag = tags[0]
// Run publishRelease
publishRelease({
token: process.env.GH_TOKEN,
owner: 'ConsenSys',
repo: 'uport-connect',
tag: latestTag,
name: 'uport-connect',
notes: '',
reuseRelease: true,
assets: ['dist/uport-connect.js', 'dist/uport-connect.js.map', 'dist/uport-connect.min.js', 'dist/uport-connect.min.js.map']
}, function (err, release) {
if (err) process.exit(1)
process.exit(0)
})
})
})