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
Next Next commit
Testing: Fail CI build if local changes exist
  • Loading branch information
aduth committed Oct 12, 2018
commit 22c85e5796fdc4f8bbfc0d330f9cae0194de5413
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@
"build": "npm run build:packages && cross-env NODE_ENV=production webpack",
"check-engines": "check-node-version --package",
"check-licenses": "concurrently \"wp-scripts check-licenses --prod --gpl2\" \"wp-scripts check-licenses --dev\"",
"ci": "concurrently \"npm run lint\" \"npm run test-unit:coverage-ci\"",
"precheck-local-changes": "npm run docs:build",
"check-local-changes": "git diff --exit-code > /dev/null || ( echo \"There are local uncommitted changes after one or both of 'npm install' or 'npm run docs:build'!\" && exit 1 );",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to add a newline \n in at the end of this message; it's just a bit busy with NPM's output in there. 🤷‍♂️

screenshot 2018-10-03 11 25 38

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, especially in Travis, it's quite difficult to parse the failing output, made worse with concurrently which doesn't display the failing command in the final result (https://github.com/kimmobrunfeldt/concurrently/issues/134).

For this case specifically, it would be nice too if we could limit the output by npm, such that the message is the only thing or at least more obvious.

"ci": "concurrently \"npm run lint\" \"npm run test-unit:coverage-ci\" \"npm run check-local-changes\"",
"predev": "npm run check-engines",
"dev": "npm run build:packages && concurrently \"cross-env webpack --watch\" \"npm run dev:packages\"",
"dev:packages": "node ./bin/packages/watch.js",
Expand Down