mirror of
https://github.com/QuasarApp/QuasarAppCI.git
synced 2025-04-28 22:54:33 +00:00
40 lines
754 B
Python
40 lines
754 B
Python
import sys
|
|
from buildbot.plugins import util
|
|
import multiprocessing
|
|
import glob
|
|
import shutil
|
|
|
|
class BaseModule:
|
|
def __init__(self):
|
|
self;
|
|
|
|
def getFactory(self):
|
|
return util.BuildFactory()
|
|
|
|
def getRepo(self):
|
|
return "";
|
|
|
|
def getPropertyes(self):
|
|
return []
|
|
|
|
def copyRegExp(self, source, dist):
|
|
|
|
res = []
|
|
|
|
for file in glob.glob(source):
|
|
res.append(file)
|
|
shutil.copy(file, dist)
|
|
|
|
return res;
|
|
|
|
@util.renderer
|
|
def makeCommand(self, props):
|
|
command = ['make']
|
|
cpus = multiprocessing.cpu_count()
|
|
|
|
if cpus:
|
|
command.extend(['-j', str(cpus)])
|
|
else:
|
|
command.extend(['-j', '1'])
|
|
return command
|