Skip to content

Instantly share code, notes, and snippets.

@howellcc
Created September 18, 2023 19:52
Show Gist options
  • Save howellcc/8ba20c551aeb5b92ed163b24bcde33a9 to your computer and use it in GitHub Desktop.
Save howellcc/8ba20c551aeb5b92ed163b24bcde33a9 to your computer and use it in GitHub Desktop.
API Capitalization Check
#!/bin/bash
#We would occasionally get commits to the Api directory with API in all caps.
#This is incorrect. This script will help me detect that. Put it on a cron job.
cd ~/source/rm-trunk/UI
results=$(/mingw64/bin/git ls-files --full-name | /usr/bin/grep UI/API)
if [ ${#results} -gt 0 ]
then
echo "API Capitalization Problem Exists!"
read -p "Enter to continue..." </dev/tty ;
else
echo "all good";
exit 0;
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment