fix: builder now uses files provisioners and auto-update installs project data (ref #470)

This commit is contained in:
Simone Margaritelli
2019-10-30 19:24:12 +01:00
parent 1600d8cbd1
commit be414e57b3
11 changed files with 149 additions and 146 deletions

View File

@ -145,6 +145,18 @@ def install(display, update):
os.system("cd %s && pip3 install ." % source_path)
data_path = os.path.join(source_path, "builder/data")
for source in glob.glob("%s/**" % data_path, recursive=True):
if os.path.isfile(source):
dest = source.replace(data_path, '')
dest_path = os.path.dirname(dest)
if not os.path.isdir(dest_path):
os.makedirs(dest_path)
logging.info("[update] installing %s to %s ..." % (source, dest))
os.system("mv '%s' '%s'" % (source, dest))
os.system("systemctl daemon-reload")
return True