Реализовал команды очистки и построения решения
This commit is contained in:
parent
733d356de1
commit
5524183b38
|
|
@ -0,0 +1,8 @@
|
|||
from commands.CleanBuildCommands.CleanBuildCommandBase import CleanBuildCommandBase
|
||||
|
||||
|
||||
class BuildCommand(CleanBuildCommandBase):
|
||||
def __init__(self, pathToBuildUtil, slnPath, slnConfig):
|
||||
commandPattern = '{0} -v build "--configuration:{1}" "--target:Build" {2}'
|
||||
CleanBuildCommandBase.__init__(self, commandPattern, pathToBuildUtil, slnPath, slnConfig)
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
from subprocess import call
|
||||
|
||||
|
||||
class CleanBuildCommandBase:
|
||||
def __init__(self, commandPattern, pathToBuildUtil, slnPath, slnConfig):
|
||||
assert commandPattern is not None
|
||||
assert pathToBuildUtil is not None
|
||||
assert slnPath is not None
|
||||
assert slnConfig is not None
|
||||
|
||||
self.__commandPattern = commandPattern
|
||||
self.__pathToBuildUtil = pathToBuildUtil
|
||||
self.__slnPath = slnPath
|
||||
self.__slnConfig = slnConfig
|
||||
|
||||
def execute(self):
|
||||
cleanCmdText = self.__commandPattern.format(self.__pathToBuildUtil, self.__slnConfig, self.__slnPath)
|
||||
returnCode = call(cleanCmdText, shell=True)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
from commands.CleanBuildCommands.CleanBuildCommandBase import CleanBuildCommandBase
|
||||
|
||||
|
||||
class CleanCommand(CleanBuildCommandBase):
|
||||
def __init__(self, pathToBuildUtil, slnPath, slnConfig):
|
||||
commandPattern = '{0} -v build "--configuration:{1}" "--target:Clean" {2}'
|
||||
CleanBuildCommandBase.__init__(self, commandPattern, pathToBuildUtil, slnPath, slnConfig)
|
||||
|
|
@ -0,0 +1 @@
|
|||
__author__ = 'rzaitov'
|
||||
Loading…
Reference in New Issue