Index: packagerChrome.py |
diff --git a/packagerChrome.py b/packagerChrome.py |
index ce6fd97b9489539cfa017bb2281079d9f7351973..4c712289798cbea372cd82fb275a9a4f3a3003f4 100644 |
--- a/packagerChrome.py |
+++ b/packagerChrome.py |
@@ -305,6 +305,19 @@ def writePackage(outputFile, pubkey, signature, zipdata): |
file.write(zipdata) |
+def add_devenv_requirements(files, metadata, params): |
+ import buildtools |
Sebastian Noack
2017/10/17 21:29:52
If we determine the path relative to this module (
tlucas
2017/10/18 09:27:49
Done.
|
+ import random |
Sebastian Noack
2017/10/17 21:29:52
This import can go to the top of the module.
tlucas
2017/10/18 09:27:49
Done.
|
+ files.read(os.path.join(buildtools.__path__[0], 'chromeDevenvPoller__.js'), |
+ relpath='devenvPoller__.js') |
+ files['devenvVersion__'] = str(random.random()) |
+ |
+ if metadata.has_option('general', 'testScripts'): |
+ files['qunit/index.html'] = createScriptPage( |
+ params, 'testIndex.html.tmpl', ('general', 'testScripts') |
+ ) |
+ |
+ |
def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuild=False, keyFile=None, devenv=False): |
metadata = readMetadata(baseDir, type) |
version = getBuildVersion(baseDir, metadata, releaseBuild, buildNum) |
@@ -349,15 +362,7 @@ def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil |
fix_translations_for_chrome(files) |
if devenv: |
- import buildtools |
- import random |
- files.read(os.path.join(buildtools.__path__[0], 'chromeDevenvPoller__.js'), relpath='devenvPoller__.js') |
- files['devenvVersion__'] = str(random.random()) |
- |
- if metadata.has_option('general', 'testScripts'): |
- files['qunit/index.html'] = createScriptPage( |
- params, 'testIndex.html.tmpl', ('general', 'testScripts') |
- ) |
+ add_devenv_requirements(files, metadata, params) |
zipdata = files.zipToString() |
signature = None |