Merge pull request #659 from resin-io/catch-uncommitted

Move to using the catch-uncommitted npm package
This commit is contained in:
Tim Perry 2017-09-15 19:45:45 +02:00 committed by GitHub
commit 55a7dccc74
3 changed files with 5 additions and 18 deletions

View File

@ -7,7 +7,7 @@ matrix:
- CAN_DEPLOY=true - CAN_DEPLOY=true
before_install: before_install:
- npm -g install npm@4 - npm -g install npm@4
script: ./automation/catch-uncommitted-output.sh script: npm run ci
notifications: notifications:
email: false email: false
deploy: deploy:

View File

@ -1,15 +0,0 @@
#!/bin/sh
set -e
npm run build
echo
if ! git diff HEAD --exit-code ; then
echo '** Uncommitted changes found after build - FAIL **'
exit 1
elif test -n "$(git ls-files --exclude-standard --others | tee /dev/tty)" ; then
echo '** Untracked uncommitted files found after build (^^^ listed above ^^^) - FAIL **'
exit 2
else
echo 'No unexpected changes after build, all good.'
fi

View File

@ -14,11 +14,12 @@
}, },
"scripts": { "scripts": {
"build": "gulp build && npm run doc", "build": "gulp build && npm run doc",
"ci": "npm run build && catch-uncommitted",
"doc": "mkdir -p doc/ && coffee extras/capitanodoc/index.coffee > doc/cli.markdown", "doc": "mkdir -p doc/ && coffee extras/capitanodoc/index.coffee > doc/cli.markdown",
"watch": "gulp watch", "watch": "gulp watch",
"lint": "gulp lint", "lint": "gulp lint",
"prepublish": "require-npm4-to-publish", "prepublish": "require-npm4-to-publish",
"prepublishOnly": "npm run build && npm run doc" "prepublishOnly": "npm run build"
}, },
"keywords": [ "keywords": [
"resin", "resin",
@ -30,6 +31,7 @@
"node": ">=6.0" "node": ">=6.0"
}, },
"devDependencies": { "devDependencies": {
"catch-uncommitted": "^1.0.0",
"ent": "^2.2.0", "ent": "^2.2.0",
"gulp": "^3.9.0", "gulp": "^3.9.0",
"gulp-coffee": "^2.2.0", "gulp-coffee": "^2.2.0",
@ -101,4 +103,4 @@
"optionalDependencies": { "optionalDependencies": {
"removedrive": "^1.0.0" "removedrive": "^1.0.0"
} }
} }