From 33f4edfd5e76cf5c7bd6f878774d92c4fee470b2 Mon Sep 17 00:00:00 2001 From: Edgar Date: Mon, 9 Aug 2021 17:08:18 +0200 Subject: [PATCH] :hammer: Added buildscript --- build.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 build.py diff --git a/build.py b/build.py new file mode 100644 index 0000000..da6843e --- /dev/null +++ b/build.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +import os, sys +import platform +from glob import glob +import yaml +import subprocess + +def system(command): + retcode = os.system(command) + if retcode != 0: + raise Exception("Error while executing:\n\t %s" % command) + + +packages = glob("./*/") + +for p in packages: + path = f'{p}/config.yml' + if not os.path.isfile(path): + continue + with open(path) as file: + config = yaml.load(file, Loader=yaml.FullLoader) + + for val in config.values(): + for v, y in val.items(): + system(f"conan create {p}{y['folder']} {v}@anotherfoxguy/stable -s=build_type=Release -k -b=missing") + system(f"conan create {p}{y['folder']} {v}@anotherfoxguy/stable -s=build_type=Debug -k -b=missing") + +data = list(filter(lambda k: 'anotherfoxguy' in k, subprocess.run(['conan','search','*','--raw'], stdout=subprocess.PIPE).stdout.decode("utf-8").split())) + +for d in data: + system(f"conan upload {d} -r ror-v2 --all --force") \ No newline at end of file