Add travis check for omitting dist in development branch

This commit is contained in:
Albin Larsson 2018-07-10 03:38:20 +02:00
parent 1e1a548459
commit 6fd4389887
2 changed files with 6 additions and 0 deletions

View File

@ -2,5 +2,6 @@ language: node_js
node_js: lts/*
script:
- bash .travis/omit-dist.sh
- npm run lint
- npm run build

5
.travis/omit-dist.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
if [ $TRAVIS_BRANCH == "develop" ] && $(git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE "^(demo/)?dist/"); then
echo 'Build output ("dist" and "demo/dist") not permitted in develop' >&2
exit 1
fi