diff --git a/tools/build-workflow.ts b/tools/build-workflow.ts index a78bca7e..b47ce4e2 100644 --- a/tools/build-workflow.ts +++ b/tools/build-workflow.ts @@ -1,14 +1,22 @@ import { exec } from 'shelljs'; import { zip } from 'zip-a-folder'; +import chalk = require('chalk'); -exec('npm run bump-version', { silent: true }); +let err = exec('npm run bump-version', { silent: true }).stderr; + +if (err) { + console.error(`Could not bump version number:\n\n${chalk.red(err)}`); + process.exit(1); +} zip( `${process.cwd()}/dist/workflow`, `${process.cwd()}/dist/Alfred Workflow Todoist.alfredworkflow` ) .then(() => { - console.log('all done!'); + console.log( + `Done: created ${chalk.green(`Alfred Workflow Todoist.alfredworkflow`)}` + ); }) .catch((err: Error) => { console.error(err.stack);