diff --git a/.travis.yml b/.travis.yml index 73a40d076..890fcfd3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,4 +5,6 @@ before_install: - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.5.1 - export PATH="$HOME/.yarn/bin:$PATH" install: yarn -script: yarn lint +script: +- yarn lint +- ./scripts/check-yarn-lock.sh diff --git a/scripts/check-yarn-lock.sh b/scripts/check-yarn-lock.sh new file mode 100755 index 000000000..e27b56ab4 --- /dev/null +++ b/scripts/check-yarn-lock.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +if [ `git diff yarn.lock | wc -l` -ne 0 ]; then + echo "" + tput setaf 1 + echo "!! UNCOMMITED YARN.LOCK CHANGES !!" + tput sgr0 + echo "" + exit 1 +fi