summaryrefslogtreecommitdiff
path: root/scripts/builder
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2012-03-17 14:26:08 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2012-03-17 14:26:08 (UTC)
commit65a7a7be3feb846d6b1062a0b858a7660e8f99fa (patch) (side-by-side diff)
tree475e4f7492b54bcf2ab10464e8013da70fa52ec3 /scripts/builder
parentcf9c0c34e1358452e0c7276c5b3ec6598f0c089d (diff)
downloadclipperz-65a7a7be3feb846d6b1062a0b858a7660e8f99fa.zip
clipperz-65a7a7be3feb846d6b1062a0b858a7660e8f99fa.tar.gz
clipperz-65a7a7be3feb846d6b1062a0b858a7660e8f99fa.tar.bz2
Some fixes to build scripts getting ready to handle the mobile version
Signed-off-by: Giulio Cesare Solaroli <giulio.cesare@clipperz.com>
Diffstat (limited to 'scripts/builder') (more/less context) (show whitespace changes)
-rw-r--r--scripts/builder/backendBuilder.py21
-rw-r--r--scripts/builder/frontendBuilder.py5
-rw-r--r--scripts/builder/repository.py4
3 files changed, 22 insertions, 8 deletions
diff --git a/scripts/builder/backendBuilder.py b/scripts/builder/backendBuilder.py
index 3e61955..5b91678 100644
--- a/scripts/builder/backendBuilder.py
+++ b/scripts/builder/backendBuilder.py
@@ -92,4 +92,9 @@ class BackendBuilder(object):
for frontend in self.frontends:
+ if (frontend.module == frontend.submodule):
+ submoduleExtension = ''
+ else:
+ submoduleExtension = '.' + frontend.submodule
+
main.createFolder(os.path.join(self.frontEndTempFolder(), frontend.module))
@@ -98,11 +103,11 @@ class BackendBuilder(object):
index = self.configureIndexContent(frontend.assemble(assemblyMode='DEBUG', versionType='DEBUG'))
- self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index_debug.html'), index)
+ self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index_debug' + submoduleExtension + '.html'), index)
if 'install' in self.versions:
index = self.configureIndexContent(frontend.assemble())
- self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index.html'), index)
+ self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index' + submoduleExtension + '.html'), index)
- self.logChecksums(index, "[" + self.name() + " - " + frontend.module + "] index.html checksum")
+ self.logChecksums(index, "[" + self.name() + " - " + frontend.module + "] index" + submoduleExtension + ".html checksum")
self.createPackage()
@@ -110,8 +115,16 @@ class BackendBuilder(object):
if 'development' in self.versions:
for frontend in self.frontends:
+ if (frontend.module == frontend.submodule):
+ submoduleExtension = ''
+ else:
+ submoduleExtension = '.' + frontend.submodule
+
+ print "FRONTEND module: " + frontend.module
+ print "FRONTEND submodule: " + frontend.submodule
+
main.createFolder(os.path.join(self.developmentTargetFolder(), frontend.module))
index = self.configureIndexContent(frontend.assemble(assemblyMode='DEVELOPMENT', versionType='DEBUG'), self.settings['development.settings']['url'])
- self.writeToFolder(self.developmentTargetFolder(), os.path.join(frontend.module, 'index.html'), index)
+ self.writeToFolder(self.developmentTargetFolder(), os.path.join(frontend.module, 'index' + submoduleExtension + '.html'), index)
diff --git a/scripts/builder/frontendBuilder.py b/scripts/builder/frontendBuilder.py
index dae837b..1f0f92f 100644
--- a/scripts/builder/frontendBuilder.py
+++ b/scripts/builder/frontendBuilder.py
@@ -89,5 +89,6 @@ class FrontendBuilder(object):
processedFile = 'html_template'
if not self.processedFiles.has_key(processedFile):
- self.processedFiles[processedFile] = self.loadFilesContent('html', ['index_template.html'])
+ # self.processedFiles[processedFile] = self.loadFilesContent('html', ['index_template.html'])
+ self.processedFiles[processedFile] = self.loadFilesContent('html', [self.settings['html.template']])
return self.processedFiles[processedFile]
@@ -320,5 +321,5 @@ class FrontendBuilder(object):
def scriptTagsForFiles (self, basePath, files):
#<script type='text/javascript' src='./js/src/bookmarklet.js'></script>
- return '\n'.join(map(lambda file: '<script type="text/javascript" src="' + basePath + '/' + file + '"></script>', files))
+ return '\n'.join(map(lambda file: '<script type="text/javascript" src="' + basePath + '/' + file + '" charset="utf-8"></script>', files))
diff --git a/scripts/builder/repository.py b/scripts/builder/repository.py
index 89db9a5..9da98a2 100644
--- a/scripts/builder/repository.py
+++ b/scripts/builder/repository.py
@@ -51,9 +51,9 @@ class GitRepository(Repository):
def revision (self):
- return repository.refs['HEAD']
+ return self.repository.refs['HEAD']
def areTherePendingChanges (self):
- return repository.is_dirty()
+ return self.repository.is_dirty()