Skip to content
This repository has been archived by the owner on Aug 31, 2019. It is now read-only.

Commit

Permalink
Readd maps api key switching and enforce it in deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kaplowitz committed Sep 22, 2016
1 parent 7fbaf9e commit 6d80f4b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
7 changes: 7 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ then
echo "Uncomment the Analytics sections in index.html and try again."
exit 1
fi
echo "Have you also switched the API keys (see index.html)? y or n"
read answer
if [ "$answer" != "y" ]
then
echo "Go to index.html and follow the instructions to enable the deployment key."
exit 1
fi
git tag Deploy$(date +"%D")
git push --tags
git branch -D gh-pages
Expand Down
18 changes: 11 additions & 7 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

// UNCOMMENT BEFORE DEPLOYING
// UNCOMMENT BEFORE DEPLOYING - ANALYTICS
// ga('create', 'UA-76375148-1', 'auto');


</script>


<!-- UNCOMMENT BEFORE DEPLOYING -->
<!-- UNCOMMENT BEFORE DEPLOYING - ANALYTICS -->
<!-- <meta name="google-site-verification" content="fl6hMTOUVgBkFwN8ivRVWGS5p-vPqF2qluCwanrhKDQ" /> -->

<!-- UNCOMMENT WHEN DEPLOYING - PRODUCTION MAPS API KEY
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDPsmX2FrR5zk5WLLSqoo1TawQpr0hSyDs&libraries=places,geometry"></script> -->

<!-- COMMENT WHEN DEPLOYING - DEV MAPS API KEY -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCuFkJ-z0W35mRxANKMAVMSLhI3kryvJ3Y&libraries=places,geometry"></script>

<!-- No more google urls after this point -->
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

Expand Down Expand Up @@ -58,8 +61,9 @@

<!-- app's entry point and Google APIs -->
<script src="app.js"></script>
<!-- Dev API key stays on master, betasrv key gets swapped in when pushing to gh-pages -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDPsmX2FrR5zk5WLLSqoo1TawQpr0hSyDs&libraries=places,geometry"></script>



<!--Controllers-->
<script src="pages/app/app-controller.js"></script>
<script src="pages/routes-and-stops/routes-and-stops-controller.js"></script>
Expand Down

0 comments on commit 6d80f4b

Please sign in to comment.