Skip to content

Commit

Permalink
Prevent publish with uncommited changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Brain committed Apr 24, 2017
1 parent 761ab94 commit fe592e8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fe592e8

Please # to comment.