Index: remoting/webapp/build-webapp.py |
diff --git a/remoting/webapp/build-webapp.py b/remoting/webapp/build-webapp.py |
index 9b8599adb6cc7bf530132fe1809772c2f9176a03..0345534ee0a9dec28e3d429de91debab5469c71b 100755 |
--- a/remoting/webapp/build-webapp.py |
+++ b/remoting/webapp/build-webapp.py |
@@ -23,6 +23,13 @@ import sys |
import time |
import zipfile |
+# Munge include path to find the google_api_keys API, and import it. |
+if __name__ == '__main__': |
+ sys.path.append( |
+ os.path.abspath(os.path.join(sys.path[0], '../../google_apis'))) |
+import google_api_keys |
+ |
+ |
def findAndReplace(filepath, findString, replaceString): |
"""Does a search and replace on the contents of a file.""" |
oldFilename = os.path.basename(filepath) + '.old' |
@@ -184,10 +191,9 @@ def buildWebApp(buildtype, version, mimetype, destination, zip_path, plugin, |
oauth2RedirectUrlJson) |
# Set the correct API keys. |
- if (buildtype == 'Official'): |
- apiClientId = ('440925447803-avn2sj1kc099s0r7v62je5s339mu0am1.' + |
- 'apps.googleusercontent.com') |
- apiClientSecret = 'Bgur6DFiOMM1h8x-AQpuTQlK' |
+ apiClientId = google_api_keys.GetClientID('REMOTING') |
+ apiClientSecret = google_api_keys.GetClientSecret('REMOTING') |
+ if (apiClientId and apiClientSecret): |
oauth2UseOfficialClientId = 'true'; |
else: |
apiClientId = ('440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.' + |