mirror of
https://github.com/googlemaps/android-samples.git
synced 2025-12-08 18:02:20 +00:00
14 lines
449 B
Bash
14 lines
449 B
Bash
#!/bin/bash
|
|
|
|
## This hook provides an example that prevents the API Key from being committed.
|
|
## The file can be adapted to your needs, but ultimately this hook will reject the commit if the MAPS_API_KEY
|
|
## has been modified. Git Hooks are located in the folder .git/hooks
|
|
|
|
FILE="local.defaults.properties"
|
|
|
|
if ! grep -q "^MAPS_API_KEY=DEFAULT_API_KEY" "$FILE"; then
|
|
echo "Error: Commit rejected. Invalid content in $FILE."
|
|
exit 1
|
|
fi
|
|
|
|
exit 0 |