コード例 #1
0
    def getWorkflowDirPath(self ,path_name_conf):
        read = Read()
#        filePath = os.path.abspath("../../conf") + "/path.txt"
        common = Common()
        filePath = common.getCommonPath();
        dirPath = read.read(filePath, path_name_conf)
        return dirPath
コード例 #2
0
class ReadFileTest(unittest.TestCase):
    def setUp(self):
        self.read = Read()
        self.__path = "D:\Python\program\svnDeployWorkflow\conf\path.txt";

    def testName(self):
        self.read.read(self.__path ,'svn_path')
コード例 #3
0
class SvnInfo(object):
    
    def __init__(self):
        self.read = Read()
        self.workPath = ''

    #执行svn命令,将svn 信息放入info.txt文件夹
    def svnCommand(self):
        filePath = os.path.abspath("../../conf") + "\path.txt"

        key = "svn_path";
        self.workPath = self.read.read(filePath, key)
        os.chdir(self.workPath)
        command = "svn info > info.txt"
        os.system(command)
        
    def getSvnInfo(self):
        self.svnCommand()
        
        #info.txt文件的路径
        infoPath = self.workPath + '/info.txt'
        key = '版本'
        svnInfo = self.read.read(infoPath, key);
        print svnInfo
        
        
        
        
コード例 #4
0
    def getPath(self):
        read = Read()
        common = Common()
        filePath = common.getCommonPath()
        self.target_path = read.read(filePath, "target_path")

        self.target_path = self.target_path + "\\" + self.workflowDirName + "\\"
コード例 #5
0
    def copyJar(self):
        key = "svn_path"
        svn_path = Read().getCommonValue(key)

        jars_key = "jars"
        jars = Read().getCommonValue(jars_key)

        jar_arr = jars.split(",")
        target_lib_path = self.target_path + "\lib\\"
        for jar in jar_arr:
            jar_path = svn_path + "\\" + jar + "\\target\\" + jar + ".jar"
            print "jar_path" + jar_path
            command = "xcopy " + jar_path + " " + target_lib_path
            os.system(command)
コード例 #6
0
 def setUp(self):
     self.read = Read()
     self.__path = "D:\Python\program\svnDeployWorkflow\conf\path.txt";
コード例 #7
0
 def getWorkflowDirPath(self ,path_name_conf):
     read = Read()
     filePath = os.path.abspath("../../conf") + "/path.txt"
     dirPath = read.read(filePath, path_name_conf)
     return dirPath
コード例 #8
0
 def __init__(self):
     self.read = Read()
     self.workPath = ''