Пример #1
0
def main():
    parser = Args()
    try:
        stream = file('config.yaml', 'r')
        config = yaml.load(stream)
    except:
        print "Cannot Open file"
        raise
    remotePath = makeGoodPath(config["PROJECT_REMOTE_PATH"])
    localPath = makeGoodPath(config["PROJECT_LOCAL_PATH"])
    if parser.args['init']:
        if parser.args['gitload']:
            i = InitMode(config["GITHUB_ADDR"], localPath, remotePath)
            i.compile(config["HOST"], config["USER"], config["PASSWORDS"],
                      True, parser.args['--verbose'])
        elif parser.args['upload']:
            i = InitMode(config["GITHUB_ADDR"], localPath, remotePath)
            i.compile(config["HOST"], config["USER"], config["PASSWORDS"],
                      False, parser.args['--verbose'])
    elif parser.args['gitload']:
        if len(config["GITHUB_ADDR"]) > 0:
            g = GitMode(parser.args["<name>"], parser.args["--exe"], parser.args["<subfolder>"], \
            localPath, remotePath)
            g.compile(config["HOST"], config["USER"], config["PASSWORDS"],
                      parser.args['--verbose'])
        else:
            print "Github address is not provided."
            raise
    elif parser.args['upload']:
        u = UploadMode(parser.args["<name>"], parser.args["--exe"], parser.args["<subfolder>"], \
            parser.args['<file>'], localPath, remotePath)
        u.compile(config["HOST"], config["USER"], config["PASSWORDS"],
                  parser.args['--verbose'])
Пример #2
0
def main():
    parser = Args()
    try:
        stream = file('config.yaml', 'r')
        config = yaml.load(stream)
    except:
        print "Cannot Open file"
        raise
    remotePath = makeGoodPath(config["PROJECT_REMOTE_PATH"])
    localPath = makeGoodPath(config["PROJECT_LOCAL_PATH"])
    if parser.args['init']:
        if parser.args['gitload']:
            i = InitMode(config["GITHUB_ADDR"], localPath, remotePath) 
            i.compile(config["HOST"], config["USER"], config["PASSWORDS"], True, parser.args['--verbose'])
        elif parser.args['upload']:
            i = InitMode(config["GITHUB_ADDR"], localPath, remotePath) 
            i.compile(config["HOST"], config["USER"], config["PASSWORDS"], False, parser.args['--verbose'])
    elif parser.args['gitload']:
        if len(config["GITHUB_ADDR"]) > 0:
            g = GitMode(parser.args["<name>"], parser.args["--exe"], parser.args["<subfolder>"], \
            localPath, remotePath)
            g.compile(config["HOST"], config["USER"], config["PASSWORDS"], parser.args['--verbose'])
        else:
            print "Github address is not provided."
            raise
    elif parser.args['upload']:
        u = UploadMode(parser.args["<name>"], parser.args["--exe"], parser.args["<subfolder>"], \
            parser.args['<file>'], localPath, remotePath)
        u.compile(config["HOST"], config["USER"], config["PASSWORDS"], parser.args['--verbose'])
Пример #3
0
def GitTest(name, execution, subfolder, local, remote, host, user, passwords):
    g = GitMode(name, execution, subfolder, local, remote)
    g.compile(host, user, passwords)
Пример #4
0
def GitTest(name, execution, subfolder, local, remote, host, user, passwords):
    g = GitMode(name, execution, subfolder, local, remote)
    g.compile(host, user, passwords)