setup-node/__tests__/verify-no-unstaged-changes.sh

18 lines
584 B
Bash
Raw Normal View History

2020-01-27 16:37:12 +01:00
#!/bin/bash
if [[ "$(git status --porcelain)" != "" ]]; then
echo ----------------------------------------
echo git status
echo ----------------------------------------
git status
echo ----------------------------------------
echo git diff
echo ----------------------------------------
git diff
echo ----------------------------------------
echo Troubleshooting
echo ----------------------------------------
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && npm ci && npm run pre-checkin"
2020-01-27 16:37:12 +01:00
exit 1
fi