From ba9eff02a0ee404e9da1431e8ab6056b3f3b97f5 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 6 Mar 2012 10:43:42 -0500 Subject: [PATCH 1/5] Fix syntax problem in php.properties.json was missing a , --- backend/php/properties/php.properties.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/php/properties/php.properties.json b/backend/php/properties/php.properties.json index 8ce703a..dd25b09 100644 --- a/backend/php/properties/php.properties.json +++ b/backend/php/properties/php.properties.json @@ -1,9 +1,9 @@ { "request.path": "index.php", - "should.pay.toll": "false" + "should.pay.toll": "false", "development.settings": { "url": "http://localhost/php/clipperz" } -} \ No newline at end of file +} From 5115ce2faf3efdf2bec242d9c37d0524bf341a94 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 6 Mar 2012 10:44:48 -0500 Subject: [PATCH 2/5] Check to make sure dulwich is available and print error --- scripts/builder/repository.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/builder/repository.py b/scripts/builder/repository.py index 89db9a5..f3f7d6f 100644 --- a/scripts/builder/repository.py +++ b/scripts/builder/repository.py @@ -8,6 +8,8 @@ def repositoryWithPath (path): repo = Repo(path) result = GitRepository(repo, path) + except ImportError: + print "Failed to import dulwich, please install http://www.samba.org/~jelmer/dulwich/" except: from mercurial import ui, hg From fc528c0f65192419ee54c2dc620d55a778660790 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 6 Mar 2012 10:47:34 -0500 Subject: [PATCH 3/5] fix GitRepository revision function --- scripts/builder/repository.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/builder/repository.py b/scripts/builder/repository.py index f3f7d6f..7ea29bb 100644 --- a/scripts/builder/repository.py +++ b/scripts/builder/repository.py @@ -52,8 +52,8 @@ class Repository(object): class GitRepository(Repository): def revision (self): - return repository.refs['HEAD'] - + return self.repository.refs['HEAD'] + def areTherePendingChanges (self): return repository.is_dirty() From 24f7bfcbe317fe9f0d7de7cef3cb3b3b341c95a5 Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 6 Mar 2012 22:09:32 -0500 Subject: [PATCH 4/5] switch from dulwich to git-python this fixes the areTherePendingChanges check --- scripts/builder/repository.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/builder/repository.py b/scripts/builder/repository.py index 7ea29bb..0efa10b 100644 --- a/scripts/builder/repository.py +++ b/scripts/builder/repository.py @@ -4,12 +4,12 @@ def repositoryWithPath (path): try: - from dulwich.repo import Repo + from git import Repo repo = Repo(path) result = GitRepository(repo, path) except ImportError: - print "Failed to import dulwich, please install http://www.samba.org/~jelmer/dulwich/" + print "Failed to import git, please install http://gitorious.org/git-python" except: from mercurial import ui, hg @@ -52,11 +52,11 @@ class Repository(object): class GitRepository(Repository): def revision (self): - return self.repository.refs['HEAD'] + return self.repository.head.commit.hexsha def areTherePendingChanges (self): - return repository.is_dirty() + return self.repository.is_dirty() #=================================================================== From 65a7a7be3feb846d6b1062a0b858a7660e8f99fa Mon Sep 17 00:00:00 2001 From: Giulio Cesare Solaroli Date: Sat, 17 Mar 2012 14:26:08 +0000 Subject: [PATCH 5/5] Some fixes to build scripts getting ready to handle the mobile version Signed-off-by: Giulio Cesare Solaroli --- scripts/builder/backendBuilder.py | 21 +++++++++++++++++---- scripts/builder/frontendBuilder.py | 5 +++-- scripts/builder/repository.py | 4 ++-- 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 @@ -91,28 +91,41 @@ class BackendBuilder(object): self.compileCode() for frontend in self.frontends: + if (frontend.module == frontend.submodule): + submoduleExtension = '' + else: + submoduleExtension = '.' + frontend.submodule + main.createFolder(os.path.join(self.frontEndTempFolder(), frontend.module)) if 'debug' in self.versions: frontend.copyResourcesToFolder(self.frontEndTempFolder()) 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() 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 @@ -88,7 +88,8 @@ class FrontendBuilder(object): def template (self): 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] @@ -319,7 +320,7 @@ class FrontendBuilder(object): def scriptTagsForFiles (self, basePath, files): # - return '\n'.join(map(lambda file: '', files)) + return '\n'.join(map(lambda file: '', files)) def scriptTagForContent (self, content): 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 @@ -50,11 +50,11 @@ class Repository(object): 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() #===================================================================