From 1638590b276a90c6401fd18c685866bce7e59ba8 Mon Sep 17 00:00:00 2001 From: Va Da Date: Tue, 5 Jun 2018 17:45:33 +0100 Subject: [PATCH] =?UTF-8?q?ci:=20=F0=9F=8E=A1=20add=20scripts=20to=20Travi?= =?UTF-8?q?s=20CI=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .npmignore | 1 + .travis.yml | 8 +++++--- lib/cli.js | 6 ++---- lib/formatCommitMessage.js | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.npmignore b/.npmignore index 654e47ce..6accba4b 100644 --- a/.npmignore +++ b/.npmignore @@ -16,3 +16,4 @@ index.js package-lock.json run.js yarn.lock +/test/ diff --git a/.travis.yml b/.travis.yml index 67fc08ac..3bca76b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,12 @@ language: node_js install: - - npm install + - yarn install script: - - npm run lint + - yarn lint + - yarn build + - yarn test after_success: - - npm run semantic-release + - npx semantic-release - npx ci-scripts slack - npx ci-scripts github-post branches: diff --git a/lib/cli.js b/lib/cli.js index e4fbdb70..7388a51c 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -9,7 +9,6 @@ const formatCommitMessage = require('./formatCommitMessage'); // eslint-disable-next-line no-process-env const executeCommand = (command, args = [], env = process.env) => { const formattedCommand = shellescape([command, ...args]); - console.log('formattedCommand', formattedCommand) const proc = spawn(formattedCommand, [], { env, shell: true, @@ -23,9 +22,8 @@ const executeCommand = (command, args = [], env = process.env) => { }; // eslint-disable-next-line no-process-env -const appendToExecuteCommand = (prepend) => (command, args = [], env = process.env) => { - return executeCommand(command, [...args, ...prepend], env); -}; +const appendToExecuteCommand = (prepend) => (command, args = [], env = process.env) => + executeCommand(command, [...args, ...prepend], env); const main = async () => { try { diff --git a/lib/formatCommitMessage.js b/lib/formatCommitMessage.js index f2d648db..280c66f2 100644 --- a/lib/formatCommitMessage.js +++ b/lib/formatCommitMessage.js @@ -25,7 +25,7 @@ const formatCommitMessage = (state) => { let scope = ''; - if (answers.scope && (answers.scope !== 'none')) { + if (answers.scope && answers.scope !== 'none') { scope = `(${answers.scope})`; }