mirror of
https://github.com/googlemaps/android-samples.git
synced 2025-12-08 18:02:20 +00:00
docs: added hook sample (#1462)
* docs: added hook sample * docs: changed default value to DEFAULT_API_KEY
This commit is contained in:
parent
8caba9ce7b
commit
588287af6e
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -42,10 +42,6 @@ jobs:
|
||||
distribution: 'adopt'
|
||||
java-version: '17'
|
||||
|
||||
- name: Uninstall NDK
|
||||
run: |
|
||||
sudo ${ANDROID_HOME}/tools/bin/sdkmanager --uninstall 'ndk-bundle'
|
||||
|
||||
- name: Build and check
|
||||
run: |
|
||||
cd ApiDemos
|
||||
@ -80,10 +76,6 @@ jobs:
|
||||
distribution: 'adopt'
|
||||
java-version: '17'
|
||||
|
||||
- name: Uninstall NDK
|
||||
run: |
|
||||
sudo ${ANDROID_HOME}/tools/bin/sdkmanager --uninstall 'ndk-bundle'
|
||||
|
||||
- name: Build and check
|
||||
run: |
|
||||
cd snippets
|
||||
|
||||
3
.github/workflows/generate-v3.yml
vendored
3
.github/workflows/generate-v3.yml
vendored
@ -57,3 +57,6 @@ jobs:
|
||||
body: |
|
||||
Generating V3 code via `./gradlew generateV3 generateV3Layout`
|
||||
branch: googlemaps-bot/generate-v3
|
||||
- name: Uninstall NDK
|
||||
run: |
|
||||
${ANDROID_HOME}/tools/bin/sdkmanager --uninstall 'ndk-bundle'
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -32,10 +32,6 @@ jobs:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Uninstall NDK
|
||||
run: |
|
||||
sudo ${ANDROID_HOME}/tools/bin/sdkmanager --uninstall 'ndk-bundle'
|
||||
|
||||
- name: Build APKs
|
||||
run: |
|
||||
echo "Generating ApiDemos (Java) APKs"
|
||||
|
||||
@ -1 +1 @@
|
||||
MAPS_API_KEY=STUB_API_KEY
|
||||
MAPS_API_KEY=DEFAULT_API_KEY
|
||||
|
||||
@ -1 +1 @@
|
||||
MAPS_API_KEY=STUB_API_KEY
|
||||
MAPS_API_KEY=DEFAULT_API_KEY
|
||||
@ -1 +1 @@
|
||||
GOOGLE_MAPS_API_KEY=STUB_API_KEY
|
||||
GOOGLE_MAPS_API_KEY=DEFAULT_API_KEY
|
||||
|
||||
14
hooks/pre-commit
Normal file
14
hooks/pre-commit
Normal file
@ -0,0 +1,14 @@
|
||||
#!/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
|
||||
@ -1 +1 @@
|
||||
MAPS_API_KEY=STUB_API_KEY
|
||||
MAPS_API_KEY=DEFAULT_API_KEY
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
MAPS_API_KEY=STUB_API_KEY
|
||||
MAPS_API_KEY=DEFAULT_API_KEY
|
||||
PLACES_API_KEY=YOUR_API_KEY
|
||||
|
||||
@ -5,4 +5,4 @@
|
||||
# For customization when using a Version Control System, please read the
|
||||
# header note.
|
||||
#Mon Apr 06 10:50:09 PDT 2020
|
||||
MAPS_API_KEY=STUB_API_KEY
|
||||
MAPS_API_KEY=DEFAULT_API_KEY
|
||||
|
||||
@ -1 +1 @@
|
||||
MAPS_API_KEY=STUB_API_KEY
|
||||
MAPS_API_KEY=DEFAULT_API_KEY
|
||||
|
||||
@ -1 +1 @@
|
||||
MAPS_API_KEY=STUB_API_KEY
|
||||
MAPS_API_KEY=DEFAULT_API_KEY
|
||||
|
||||
@ -1 +1 @@
|
||||
MAPS_API_KEY=STUB_API_KEY
|
||||
MAPS_API_KEY=DEFAULT_API_KEY
|
||||
|
||||
@ -1 +1 @@
|
||||
MAPS_API_KEY=STUB_API_KEY
|
||||
MAPS_API_KEY=DEFAULT_API_KEY
|
||||
|
||||
@ -1 +1 @@
|
||||
MAPS_API_KEY=STUB_API_KEY
|
||||
MAPS_API_KEY=DEFAULT_API_KEY
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user