Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add commit status notifications
  • Loading branch information
shawnbot committed Oct 12, 2017
commit 7413bcf71339dc465f6684e468a42fe2933c257d
12 changes: 11 additions & 1 deletion script/release-candidate
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ const getUpdated = (args) => {
.then(updated => updated.map(pkg => pkg.name))
}

const notify = status => {
return execa('script/notify', ['error'])
.catch(error => {
console.error('notify error:', error)
})
}

const writePackage = (pkg) => {
const {dir} = pkg
delete pkg.dir
Expand Down Expand Up @@ -127,9 +134,12 @@ revertPackages()
})
return Promise.all(tasks)
})
.then(() => notify('success'))
})
})
.catch(error => {
console.error('Error:', error)
process.exit(1)
process.exitCode = 1
return notify('error')
})
.then(() => process.exit())