gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1766626 - /gump/live/python/gump/core/build/basebuilder.py
Date Wed, 26 Oct 2016 04:30:17 GMT
Author: bodewig
Date: Wed Oct 26 04:30:17 2016
New Revision: 1766626

URL: http://svn.apache.org/viewvc?rev=1766626&view=rev
Log:
add infrastructure for pre- and post-build actions

Modified:
    gump/live/python/gump/core/build/basebuilder.py

Modified: gump/live/python/gump/core/build/basebuilder.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/build/basebuilder.py?rev=1766626&r1=1766625&r2=1766626&view=diff
==============================================================================
--- gump/live/python/gump/core/build/basebuilder.py (original)
+++ gump/live/python/gump/core/build/basebuilder.py Wed Oct 26 04:30:17 2016
@@ -71,13 +71,20 @@ class BaseBuilder(RunSpecific):
         RunSpecific.__init__(self, run)
         self.name = name
 
-    def buildProject(self, project, language, _stats):
+    def buildProject(self, project, language, stats):
         """
         Build the project using the configured command.
         """
         log.info('Run ' + self.name + ' on Project: #[' + `project.getPosition()` + \
                      '] : ' + project.getName())
-        self.execute_and_record_build_result(project, self.get_command(project, language))
+
+        self.pre_build(project, language, stats)
+
+        if project.okToPerformWork():
+            self.execute_and_record_build_result(project,
+                                                 self.get_command(project, language))
+        if project.wasBuilt():
+            self.post_build(project, language, stats)
 
     def preview(self, project, language, _stats):
         """
@@ -119,3 +126,15 @@ class BaseBuilder(RunSpecific):
         Get the command that builds the project.
         """
         return None
+
+    def pre_build(self, _project, _language, _stats):
+        """
+        Perform any actions required before starting the actual build command.
+        """
+        return None
+
+    def post_build(self, _project, _language, _stats):
+        """
+        Perform any actions required to clean up after the actual build.
+        """
+        return None



Mime
View raw message