Index: remoting/webapp/build-webapp.py |
diff --git a/remoting/webapp/build-webapp.py b/remoting/webapp/build-webapp.py |
index 9b8599adb6cc7bf530132fe1809772c2f9176a03..6212246e90961f8bbe78138e52f7902c971e4c06 100755 |
--- a/remoting/webapp/build-webapp.py |
+++ b/remoting/webapp/build-webapp.py |
@@ -23,6 +23,12 @@ 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'))) |
Wez
2012/09/18 01:10:36
This assumes that the path containing "google_apis
Jamie
2012/09/18 01:23:57
It certainly appears to be when you run this using
|
+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,16 +190,11 @@ 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' |
- oauth2UseOfficialClientId = 'true'; |
- else: |
- apiClientId = ('440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.' + |
- 'apps.googleusercontent.com') |
- apiClientSecret = 'W2ieEsG-R1gIA4MMurGrgMc_' |
- oauth2UseOfficialClientId = 'false'; |
+ apiClientId = google_api_keys.GetClientID('REMOTING') |
+ apiClientSecret = google_api_keys.GetClientSecret('REMOTING') |
+ # TODO(jamiewalch): Get rid of the useOfficialClientId hack. |
Wez
2012/09/18 01:10:36
nit: Create & refer to a bug for that work.
Jamie
2012/09/18 01:23:57
Done.
|
+ oauth2UseOfficialClientId = 'true'; |
+ |
findAndReplace(os.path.join(destination, 'plugin_settings.js'), |
"'API_CLIENT_ID'", |
"'" + apiClientId + "'") |