gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1679370 - in /gump/live/python/gump/core/model: builder.py project.py
Date Thu, 14 May 2015 13:47:53 GMT
Author: bodewig
Date: Thu May 14 13:47:52 2015
New Revision: 1679370

URL: http://svn.apache.org/r1679370
Log:
model side of an msbuild/xbuild builder

Modified:
    gump/live/python/gump/core/model/builder.py
    gump/live/python/gump/core/model/project.py

Modified: gump/live/python/gump/core/model/builder.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/model/builder.py?rev=1679370&r1=1679369&r2=1679370&view=diff
==============================================================================
--- gump/live/python/gump/core/model/builder.py (original)
+++ gump/live/python/gump/core/model/builder.py Thu May 14 13:47:52 2015
@@ -271,6 +271,11 @@ class NAnt(BaseAnt):
     """ A NAnt command (within a project) """
     pass
 
+# represents a <msbuild/> element
+class MSBuild(BaseAnt):
+    """ A MSBuild command (within a project) """
+    pass
+
 # represents an <maven/> element
 class Maven1(Builder):
     """ A Maven 1.x command (within a project)"""

Modified: gump/live/python/gump/core/model/project.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/model/project.py?rev=1679370&r1=1679369&r2=1679370&view=diff
==============================================================================
--- gump/live/python/gump/core/model/project.py (original)
+++ gump/live/python/gump/core/model/project.py Thu May 14 13:47:52 2015
@@ -29,7 +29,7 @@ import gump.util.process.command
 from gump import log
 from gump.core.config import default
 from gump.core.model.builder import Ant, NAnt, Maven1, Maven, MvnInstall, \
-    MVN_VERSION2, MVN_VERSION3, Script, Configure, Make, Gradle
+    MVN_VERSION2, MVN_VERSION3, Script, Configure, Make, Gradle, MSBuild
 from gump.core.model.depend import Dependable, importDomDependency
 from gump.core.model.misc import AddressPair, \
     Resultable, Positioned, Mkdir, Delete, Report, Work
@@ -82,6 +82,7 @@ class Project(NamedModelObject, Statable
         #
         self.ant = None
         self.nant = None
+        self.msbuild = None
         self.maven = None
         self.mvn = None
         self.script = None
@@ -172,6 +173,11 @@ class Project(NamedModelObject, Statable
             return True
         return False
 
+    def hasMSBuild(self):
+        if self.msbuild:
+            return True
+        return False
+
     def hasMaven(self):
         if self.maven:
             return True
@@ -208,6 +214,9 @@ class Project(NamedModelObject, Statable
     def getNAnt(self):
         return self.nant
 
+    def getMSBuild(self):
+        return self.msbuild
+
     def getMaven(self):
         return self.maven
 
@@ -457,6 +466,11 @@ class Project(NamedModelObject, Statable
             # Copy over any XML errors/warnings
             # :TODO:#1: transferAnnotations(self.xml.nant, self)
 
+        # Import any <msbuild part [if not packaged]
+        if self.hasDomChild('msbuild') and not packaged:
+            self.msbuild = MSBuild(self.getDomChild('msbuild'), self)
+            self.builder.append(self.msbuild)
+
         # Import any <maven part [if not packaged]
         for tag in ['maven', 'mvn1']:
             if self.hasDomChild(tag) and not packaged:
@@ -506,7 +520,7 @@ class Project(NamedModelObject, Statable
             # Copy over any XML errors/warnings
             # :TODO:#1: transferAnnotations(self.xml.script, self)
 
-        # Import any <nant part [if not packaged]
+        # Import any <make part [if not packaged]
         if self.hasDomChild('make') and not packaged:
             self.make = Make(self.getDomChild('make'), self)
             self.builder.append(self.make)
@@ -514,7 +528,7 @@ class Project(NamedModelObject, Statable
             # Copy over any XML errors/warnings
             # :TODO:#1: transferAnnotations(self.xml.make, self)
 
-        # Import any <nant part [if not packaged]
+        # Import any <configure part [if not packaged]
         if self.hasDomChild('configure') and not packaged:
             self.configure = Configure(self.getDomChild('configure'), self)
             self.builder.append(self.configure)



Mime
View raw message