summaryrefslogtreecommitdiff
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) (unidiff)
tree475e4f7492b54bcf2ab10464e8013da70fa52ec3
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 (more/less context) (ignore 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
@@ -93,2 +93,7 @@ class BackendBuilder(object):
93 for frontend in self.frontends: 93 for frontend in self.frontends:
94 if (frontend.module == frontend.submodule):
95 submoduleExtension = ''
96 else:
97 submoduleExtension = '.' + frontend.submodule
98
94 main.createFolder(os.path.join(self.frontEndTempFolder(), frontend.module)) 99 main.createFolder(os.path.join(self.frontEndTempFolder(), frontend.module))
@@ -99,3 +104,3 @@ class BackendBuilder(object):
99 index = self.configureIndexContent(frontend.assemble(assemblyMode='DEBUG', versionType='DEBUG')) 104 index = self.configureIndexContent(frontend.assemble(assemblyMode='DEBUG', versionType='DEBUG'))
100 self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index_debug.html'), index) 105 self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index_debug' + submoduleExtension + '.html'), index)
101 106
@@ -103,5 +108,5 @@ class BackendBuilder(object):
103 index = self.configureIndexContent(frontend.assemble()) 108 index = self.configureIndexContent(frontend.assemble())
104 self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index.html'), index) 109 self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index' + submoduleExtension + '.html'), index)
105 110
106 self.logChecksums(index, "[" + self.name() + " - " + frontend.module + "] index.html checksum") 111 self.logChecksums(index, "[" + self.name() + " - " + frontend.module + "] index" + submoduleExtension + ".html checksum")
107 112
@@ -111,2 +116,10 @@ class BackendBuilder(object):
111 for frontend in self.frontends: 116 for frontend in self.frontends:
117 if (frontend.module == frontend.submodule):
118 submoduleExtension = ''
119 else:
120 submoduleExtension = '.' + frontend.submodule
121
122 print "FRONTEND module: " + frontend.module
123 print "FRONTEND submodule: " + frontend.submodule
124
112 main.createFolder(os.path.join(self.developmentTargetFolder(), frontend.module)) 125 main.createFolder(os.path.join(self.developmentTargetFolder(), frontend.module))
@@ -114,3 +127,3 @@ class BackendBuilder(object):
114 index = self.configureIndexContent(frontend.assemble(assemblyMode='DEVELOPMENT', versionType='DEBUG'), self.settings['development.settings']['url']) 127 index = self.configureIndexContent(frontend.assemble(assemblyMode='DEVELOPMENT', versionType='DEBUG'), self.settings['development.settings']['url'])
115 self.writeToFolder(self.developmentTargetFolder(), os.path.join(frontend.module, 'index.html'), index) 128 self.writeToFolder(self.developmentTargetFolder(), os.path.join(frontend.module, 'index' + submoduleExtension + '.html'), index)
116 129
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
@@ -90,3 +90,4 @@ class FrontendBuilder(object):
90 if not self.processedFiles.has_key(processedFile): 90 if not self.processedFiles.has_key(processedFile):
91 self.processedFiles[processedFile] = self.loadFilesContent('html', ['index_template.html']) 91 #self.processedFiles[processedFile] = self.loadFilesContent('html', ['index_template.html'])
92 self.processedFiles[processedFile] = self.loadFilesContent('html', [self.settings['html.template']])
92 93
@@ -321,3 +322,3 @@ class FrontendBuilder(object):
321 #<script type='text/javascript' src='./js/src/bookmarklet.js'></script> 322 #<script type='text/javascript' src='./js/src/bookmarklet.js'></script>
322 return '\n'.join(map(lambda file: '<script type="text/javascript" src="' + basePath + '/' + file + '"></script>', files)) 323 return '\n'.join(map(lambda file: '<script type="text/javascript" src="' + basePath + '/' + file + '" charset="utf-8"></script>', files))
323 324
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
@@ -52,3 +52,3 @@ class GitRepository(Repository):
52 def revision (self): 52 def revision (self):
53 return repository.refs['HEAD'] 53 return self.repository.refs['HEAD']
54 54
@@ -56,3 +56,3 @@ class GitRepository(Repository):
56 def areTherePendingChanges (self): 56 def areTherePendingChanges (self):
57 return repository.is_dirty() 57 return self.repository.is_dirty()
58 58