Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: remoting/webapp/build-webapp.py

Issue 22901007: Move remoting identity API client id into src-internal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typos. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/webapp/appsv2.patch ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Creates a directory with with the unpacked contents of the remoting webapp. 6 """Creates a directory with with the unpacked contents of the remoting webapp.
7 7
8 The directory will contain a copy-of or a link-to to all remoting webapp 8 The directory will contain a copy-of or a link-to to all remoting webapp
9 resources. This includes HTML/JS and any plugin binaries. The script also 9 resources. This includes HTML/JS and any plugin binaries. The script also
10 massages resulting files appropriately with host plugin data. Finally, 10 massages resulting files appropriately with host plugin data. Finally,
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 "'THIRD_PARTY_AUTH_REDIRECT_URL'", 272 "'THIRD_PARTY_AUTH_REDIRECT_URL'",
273 thirdPartyAuthUrlJs) 273 thirdPartyAuthUrlJs)
274 findAndReplace(os.path.join(destination, 'manifest.json'), 274 findAndReplace(os.path.join(destination, 'manifest.json'),
275 "THIRD_PARTY_AUTH_REDIRECT_URL", 275 "THIRD_PARTY_AUTH_REDIRECT_URL",
276 thirdPartyAuthUrlJson) 276 thirdPartyAuthUrlJson)
277 277
278 # Set the correct API keys. 278 # Set the correct API keys.
279 # For overriding the client ID/secret via env vars, see google_api_keys.py. 279 # For overriding the client ID/secret via env vars, see google_api_keys.py.
280 apiClientId = google_api_keys.GetClientID('REMOTING') 280 apiClientId = google_api_keys.GetClientID('REMOTING')
281 apiClientSecret = google_api_keys.GetClientSecret('REMOTING') 281 apiClientSecret = google_api_keys.GetClientSecret('REMOTING')
282 apiClientIdV2 = google_api_keys.GetClientID('REMOTING_IDENTITY_API')
Jói 2013/08/15 09:26:08 It would be good to also add this to the debugging
Jamie 2013/08/15 18:29:59 Done.
282 283
283 findAndReplace(os.path.join(destination, 'plugin_settings.js'), 284 findAndReplace(os.path.join(destination, 'plugin_settings.js'),
284 "'API_CLIENT_ID'", 285 "'API_CLIENT_ID'",
285 "'" + apiClientId + "'") 286 "'" + apiClientId + "'")
286 findAndReplace(os.path.join(destination, 'plugin_settings.js'), 287 findAndReplace(os.path.join(destination, 'plugin_settings.js'),
287 "'API_CLIENT_SECRET'", 288 "'API_CLIENT_SECRET'",
288 "'" + apiClientSecret + "'") 289 "'" + apiClientSecret + "'")
290 findAndReplace(os.path.join(destination, 'manifest.json'),
291 '"REMOTING_IDENTITY_API_CLIENT_ID"',
292 '"' + apiClientIdV2 + '"')
289 293
290 # Use a consistent extension id for unofficial builds. 294 # Use a consistent extension id for unofficial builds.
291 if buildtype != 'Official': 295 if buildtype != 'Official':
292 manifestKey = '"key": "remotingdevbuild",' 296 manifestKey = '"key": "remotingdevbuild",'
293 else: 297 else:
294 manifestKey = '' 298 manifestKey = ''
295 findAndReplace(os.path.join(destination, 'manifest.json'), 299 findAndReplace(os.path.join(destination, 'manifest.json'),
296 'MANIFEST_KEY_FOR_UNOFFICIAL_BUILD', manifestKey) 300 'MANIFEST_KEY_FOR_UNOFFICIAL_BUILD', manifestKey)
297 301
298 # Make the zipfile. 302 # Make the zipfile.
(...skipping 23 matching lines...) Expand all
322 patches.append(arg) 326 patches.append(arg)
323 else: 327 else:
324 files.append(arg) 328 files.append(arg)
325 329
326 return buildWebApp(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], 330 return buildWebApp(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4],
327 sys.argv[5], sys.argv[6], files, locales, patches) 331 sys.argv[5], sys.argv[6], files, locales, patches)
328 332
329 333
330 if __name__ == '__main__': 334 if __name__ == '__main__':
331 sys.exit(main()) 335 sys.exit(main())
OLDNEW
« no previous file with comments | « remoting/webapp/appsv2.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698