-rwxr-xr-x | scripts/builder/backends/checksumBuilder.py | 50 | ||||
-rwxr-xr-x[-rw-r--r--] | scripts/builder/backends/devBuilder.py | 8 |
2 files changed, 50 insertions, 8 deletions
diff --git a/scripts/builder/backends/checksumBuilder.py b/scripts/builder/backends/checksumBuilder.py new file mode 100755 index 0000000..5f44c8a --- a/dev/null +++ b/scripts/builder/backends/checksumBuilder.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +# -*- coding: UTF-8 -*- + +import os +import shutil +import subprocess +import main + +from backendBuilder import BackendBuilder + +class ChecksumBuilder(BackendBuilder): + + def name(self): + return "Checksum builder" + + + def relativePath(self): + return 'checksum' + + + def compileCode (self): + pass + + + def createPackage (self): + src = self.tempFolder() + dst = self.targetFolder() + + shutil.copytree(src, dst) + + + def run (self): + print self.name() + " - RUN (checksum)" + + for frontend in self.frontends: + if (frontend.module == frontend.submodule): + submoduleExtension = '' + else: + submoduleExtension = '.' + frontend.submodule + + main.createFolder(os.path.join(self.frontEndTempFolder(), frontend.module)) + + index = self.configureIndexContent(frontend.assemble()) + self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index' + submoduleExtension + '.html'), index) + self.logChecksums(index, "[" + self.name() + " - " + frontend.module + "] index" + submoduleExtension + ".html checksum") + print "" + + self.createPackage() + + diff --git a/scripts/builder/backends/devBuilder.py b/scripts/builder/backends/devBuilder.py index 671765e..354e014 100644..100755 --- a/scripts/builder/backends/devBuilder.py +++ b/scripts/builder/backends/devBuilder.py @@ -1,56 +1,48 @@ #!/usr/bin/env python # -*- coding: UTF-8 -*- import os import shutil import subprocess import main from backendBuilder import BackendBuilder class DevBuilder(BackendBuilder): def name(self): return "Dev builder" def relativePath(self): return 'dev' -# def frontEndTempFolder (self): -# return os.path.join(self.tempFolder(), 'src', 'main', 'webapp') - - -# def targetFolder (self): -# return self.projectTargetDir - - def compileCode (self): pass def createPackage (self): src = self.tempFolder() dst = self.targetFolder() shutil.copytree(src, dst) def run (self): print self.name() + " - RUN (dev)" for frontend in self.frontends: if (frontend.module == frontend.submodule): submoduleExtension = '' else: submoduleExtension = '.' + frontend.submodule main.createFolder(os.path.join(self.frontEndTempFolder(), frontend.module)) index = self.configureIndexContent(frontend.assemble(assemblyMode='DEBUG', versionType='DEBUG')) self.writeToFolder(self.frontEndTempFolder(), os.path.join(frontend.module, 'index' + submoduleExtension + '.html'), index) self.createPackage() |