Exemple #1
0
def fetch(project) :
    working_dir = config['projects'][project]['repo_path']
    if not os.path.exists(working_dir) :
        clone(project)
    res = 'empty'
    with path.cd( working_dir ) :
        res = process.get_output( [ "git", "fetch" ] )
    return res
Exemple #2
0
def branches(project) :
    working_dir = config['projects'][project]['repo_path']
    if not os.path.exists(working_dir) :
        clone(project)

    result = []
    with path.cd( working_dir ) :
        res = process.get_output( ["git", "branch", "-r"] )
        brs = re.findall("origin/[\w\-]+", res)
        for x in brs :
            result.append(x[7:])

    result.append('master')
    result.append('develop')

    return result
Exemple #3
0
def clone(project) :
    with path.cd( config['projects'][project]['repo_path'] ) :
        out = process.get_output([ "git", "clone", config[ 'projects' ][ project ][ 'repo' ], "." ])
        logger.write( out )
Exemple #4
0
#!/usr/bin/python3

from process import get_output
from pathlib import Path
import glob

s = str(Path("./vue-compiled/src/").resolve())

files = glob.glob("./vue-compiled/src/**/*.js.o", recursive=True)
files = [Path(f).resolve() for f in files]

d = {}

for f in files:
    d[f] = get_output(f)

for k, v in d.items():
    print(str(k)[len(s) + 1:], ':', len(v))