From 0e56b6d31aa191128db1b535b885ad6244692511 Mon Sep 17 00:00:00 2001 From: riyasng12 Date: Wed, 20 Dec 2023 18:42:07 +0530 Subject: [PATCH] refactor: refactor upload files for parachain --- main.star | 7 +++---- package_io/utils.star | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/main.star b/main.star index 776305e..63e84da 100644 --- a/main.star +++ b/main.star @@ -34,10 +34,9 @@ def run_polkadot_setup(plan, args): """ utils.check_config_validity(plan, args) - - plan.upload_files(src = "./parachain/static_files/configs", name = "configs") - plan.upload_files(src = "./parachain/static_files/javascript", name = "javascript") - + + utils.upload_files(plan) + prometheus_template = read_file("./package_io/static_files/prometheus.yml.tmpl") service_details = {} diff --git a/package_io/utils.star b/package_io/utils.star index 2cc333f..13a94d8 100644 --- a/package_io/utils.star +++ b/package_io/utils.star @@ -71,3 +71,7 @@ def check_config_validity(plan, args): else: return fail("parachain node-type can be only validator/full/collator") +def upload_files(plan): + plan.upload_files(src = "../parachain/static_files/configs", name = "configs") + plan.upload_files(src = "../parachain/static_files/javascript", name = "javascript") +