Skip to content

Commit

Permalink
fix: abort create-release-branch script when jq is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
DaRaFF committed Feb 24, 2020
1 parent cd58d2c commit 3fd9ac9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/commands/create-release-branch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const slackMessenger = require('slack-messenger')
const commandExistsSync = require('command-exists').sync

module.exports = function (dep) {
const { logBgMagenta, logRed, logYellow } = dep
Expand Down Expand Up @@ -40,6 +41,9 @@ module.exports = function (dep) {
}

cmd.handler = function (argv) {
// check dependencies
if (!commandExistsSync('jq')) return logRed('Please install jq (https://stedolan.github.io/jq/) as binary')

// test command npx release-tools create-release-branch -t 1.2.0 -b blubb -n 1111 -d true
// git add . && git fix-last-commit && git pushf

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@octokit/rest": "16.2.0",
"camelcase": "^5.0.0",
"chalk": "^2.3.2",
"command-exists": "^1.2.8",
"require-dir": "^1.0.0",
"semver": "^5.3.0",
"shelljs": "^0.8.1",
Expand Down

0 comments on commit 3fd9ac9

Please sign in to comment.