diff --git a/.travis.yml b/.travis.yml index a8a065bc..87560f81 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ matrix: - CAN_DEPLOY=true before_install: - npm -g install npm@4 -script: ./automation/catch-uncommitted-output.sh +script: npm run ci notifications: email: false deploy: diff --git a/automation/catch-uncommitted-output.sh b/automation/catch-uncommitted-output.sh deleted file mode 100755 index 608844ec..00000000 --- a/automation/catch-uncommitted-output.sh +++ /dev/null @@ -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 diff --git a/package.json b/package.json index 86aad686..71da5ec6 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,12 @@ }, "scripts": { "build": "gulp build && npm run doc", + "ci": "npm run build && catch-uncommitted", "doc": "mkdir -p doc/ && coffee extras/capitanodoc/index.coffee > doc/cli.markdown", "watch": "gulp watch", "lint": "gulp lint", "prepublish": "require-npm4-to-publish", - "prepublishOnly": "npm run build && npm run doc" + "prepublishOnly": "npm run build" }, "keywords": [ "resin", @@ -30,6 +31,7 @@ "node": ">=6.0" }, "devDependencies": { + "catch-uncommitted": "^1.0.0", "ent": "^2.2.0", "gulp": "^3.9.0", "gulp-coffee": "^2.2.0", @@ -101,4 +103,4 @@ "optionalDependencies": { "removedrive": "^1.0.0" } -} \ No newline at end of file +}