Essentially checking if the `yarn documentation` produces un-staged files, if yes, then exiting with code 1.
10 lines
253 B
Bash
Executable File
10 lines
253 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if [ -z "$(git status --porcelain ./docs)" ]; then
|
|
echo "📄 Documentation not modified";
|
|
exit 0;
|
|
else
|
|
echo "📄 Documentation has been modified, you need to commit the changes.";
|
|
git status --porcelain ./docs
|
|
exit 1;
|
|
fi |