Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: packagerSafari.py

Issue 29326188: Issue 3039 - Generate qunit/index.html based on metadata (Closed)
Patch Set: Avoid hardcoding "Adblock Plus", instead use basename Created Sept. 9, 2015, 4:28 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « packagerChrome.py ('k') | testIndex.html.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packagerSafari.py
diff --git a/packagerSafari.py b/packagerSafari.py
index 2d772e1406af19cc4d880180f7abfa137b2b72df..d999e943c1af764db6c453cb412bcdf861eb9ccc 100644
--- a/packagerSafari.py
+++ b/packagerSafari.py
@@ -11,7 +11,7 @@ import ConfigParser
from urlparse import urlparse
from packager import readMetadata, getDefaultFileName, getBuildVersion, getTemplate, Files
-from packagerChrome import convertJS, importGeckoLocales, getIgnoredFiles, getPackageFiles, defaultLocale
+from packagerChrome import convertJS, importGeckoLocales, getIgnoredFiles, getPackageFiles, defaultLocale, createScriptPage
def processFile(path, data, params):
return data
@@ -93,14 +93,6 @@ def createManifest(params, files):
developerIdentifier=params.get('developerIdentifier')
).encode('utf-8')
-def createBackgroundPage(params):
- template = getTemplate('background.html.tmpl', autoEscape=True)
- return template.render(
- backgroundScripts=params['metadata'].get(
- 'general', 'backgroundScripts'
- ).split()
- ).encode('utf-8')
-
def createInfoModule(params):
template = getTemplate('safariInfo.js.tmpl')
return template.render(params).encode('utf-8')
@@ -258,12 +250,17 @@ def createBuild(baseDir, type, outFile=None, buildNum=None, releaseBuild=False,
if metadata.has_section('import_locales'):
importGeckoLocales(params, files)
+ if metadata.has_option('general', 'testScripts'):
+ files['qunit/index.html'] = createScriptPage(params, 'testIndex.html.tmpl',
+ ('general', 'testScripts'))
+
if keyFile:
certs, key = get_certificates_and_key(keyFile)
params['developerIdentifier'] = get_developer_identifier(certs)
files['lib/info.js'] = createInfoModule(params)
- files['background.html'] = createBackgroundPage(params)
+ files['background.html'] = createScriptPage(params, 'background.html.tmpl',
+ ('general', 'backgroundScripts'))
files['Info.plist'] = createManifest(params, files)
fixAbsoluteUrls(files)
« no previous file with comments | « packagerChrome.py ('k') | testIndex.html.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld