gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1679391 - /gump/live/python/gump/core/run/gumpenv.py
Date Thu, 14 May 2015 15:27:38 GMT
Author: bodewig
Date: Thu May 14 15:27:37 2015
New Revision: 1679391

URL: http://svn.apache.org/r1679391
Log:
check for NuGet - and fix what looks like borked logic in NAnt and MSBuild checks

Modified:
    gump/live/python/gump/core/run/gumpenv.py

Modified: gump/live/python/gump/core/run/gumpenv.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/run/gumpenv.py?rev=1679391&r1=1679390&r2=1679391&view=diff
==============================================================================
--- gump/live/python/gump/core/run/gumpenv.py (original)
+++ gump/live/python/gump/core/run/gumpenv.py Thu May 14 15:27:37 2015
@@ -77,6 +77,8 @@ class GumpEnvironment(Annotatable, Worka
         self.nant_command = None
         self.noMSBuild = False
         self.msbuild_command = None
+        self.noNuGet = False
+        self.nuget_command = None
         self.noMaven = False
         self.noMaven2 = False
         self.noMaven3 = False
@@ -220,6 +222,7 @@ class GumpEnvironment(Annotatable, Worka
 
         self._check_nant()
         self._check_msbuild()
+        self._check_nuget()
         self.noMono = self._checkWithDashVersion('mono', "no Mono runtime")
 
         self.noMake = self._checkWithDashVersion('make', "no make builds")
@@ -428,8 +431,10 @@ class GumpEnvironment(Annotatable, Worka
                     if self.noNAnt:
                         self.nant_command = 'nant'
                 else:
+                    self.noNAnt = True
                     self.nant_command = 'NAnt.exe'
             else:
+                self.noNAnt = True
                 self.nant_command = 'NAnt'
 
     def get_nant_command(self):
@@ -442,15 +447,17 @@ class GumpEnvironment(Annotatable, Worka
         if not self.checked:
             if not self._checkWithDashVersion('MSBuild', "no MSBuild builds", '/help'):
                 if not self._checkWithDashVersion('MSBuild.exe', "no MSBUild builds", '/help'):
-                    self.noNAnt = self._checkWithDashVersion('xbuild',
+                    self.noMSBuild = self._checkWithDashVersion('xbuild',
                                                              "no MSBuild builds",
                                                              '/help')
-                    if self.noNAnt:
-                        self.nant_command = 'xbuild'
+                    if self.noMSBuild:
+                        self.msbuild_command = 'xbuild'
                 else:
-                    self.nant_command = 'MSBuild.exe'
+                    self.noMSBuild = True
+                    self.msbuild_command = 'MSBuild.exe'
             else:
-                self.nant_command = 'MSBuild'
+                self.noMSBuild = True
+                self.msbuild_command = 'MSBuild'
 
     def get_msbuild_command(self):
         self._check_msbuild()
@@ -458,6 +465,24 @@ class GumpEnvironment(Annotatable, Worka
             return None
         return self.msbuild_command
 
+    def _check_nuget(self):
+        if not self.checked:
+            if not self._checkWithDashVersion('nuget', "no NuGet builds", 'help'):
+                self.noNuGet = self._checkWithDashVersion('nuget.exe',
+                                                          "no NuGet builds",
+                                                          'help'):
+                if self.noNuGet
+                    self.nuget_command = 'nuget.exe'
+            else:
+                self.noNuGet = True
+                self.nuget_command = 'nuget'
+
+    def get_nuget_command(self):
+        self._check_nuget()
+        if not self.noNuGet:
+            return None
+        return self.nuget_command
+
 if __name__ == '__main__':
     env = GumpEnvironment()
     env.checkEnvironment()



Mime
View raw message