From fe592e875de939bd97c846bb1bc877e9a079360a Mon Sep 17 00:00:00 2001 From: Daniel Brain Date: Mon, 24 Apr 2017 10:21:42 -0700 Subject: [PATCH] Prevent publish with uncommited changes --- publish.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/publish.sh b/publish.sh index 04dc0233..2cda4cf7 100755 --- a/publish.sh +++ b/publish.sh @@ -2,6 +2,16 @@ set -e; +if ! git diff-files --quiet; then + echo "Can not publish with unstaged uncommited changes"; + exit 1; +fi; + +if ! git diff-index --quiet --cached HEAD; then + echo "Can not publish with staged uncommited changes"; + exit 1; +fi; + rm -rf node_modules/cross-domain-safe-weakmap node_modules/sync-browser-mocks npm install cross-domain-safe-weakmap sync-browser-mocks