Created
June 24, 2023 14:30
-
-
Save skateman/57e174c63d99ae56d3359578202c0de5 to your computer and use it in GitHub Desktop.
Git hook that detects Gemfile.lock changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color | |
MESSAGE="${RED}Changes detected in the Gemfile.lock, consider rebuilding your container image.${NC}" | |
if [[ $3 == 1 ]]; then | |
git diff --quiet $1 $2 -- Gemfile.lock || echo -e $MESSAGE | |
fi; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment