Skip to content

Commit

Permalink
- update jsn to support env vars, add more / better verbosity output …
Browse files Browse the repository at this point in the history
…and task print output
  • Loading branch information
GBDixonAlex committed Jul 12, 2024
1 parent 56da609 commit 58d069b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/jsn
31 changes: 28 additions & 3 deletions scripts/pmbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
import zipfile
import getpass

import jsn.jsn as jsn

import util
import dependencies
import jsn.jsn as jsn
import cgu.cgu as cgu


from http.server import HTTPServer, CGIHTTPRequestHandler, executable


Expand Down Expand Up @@ -1286,6 +1288,19 @@ def pmbuild_profile_help(config, build_order):
print("\navailable tasks for profile " + config["user_vars"]["profile"] + ":")
print(" config.jsn (edit task settings or add new ones in here)")
print(" build order:")

non_profiles = [
"tools",
"tools_help",
"extensions",
"user_vars",
"special_args",
"post_build_order",
"pre_build_order",
"build_order",
"user_args"
]

for task_name in build_order:
task = config[task_name]

Expand All @@ -1298,9 +1313,15 @@ def pmbuild_profile_help(config, build_order):
msg = " " * 8 + task_name + " (disabled)"
util.log_lvl(msg, config, "-verbose")
continue

print(" " * 8 + task_name)

print("")
print(" explicit tasks:")
for key in config:
if key not in build_order and key not in non_profiles:
print(" " * 8 + key)


# build help for core tasks
def core_help(config, taskname, task_type):
Expand Down Expand Up @@ -1598,7 +1619,7 @@ def main():
files = jsn.loads("{files:" + user_files + "}")
config["tool"]["files"] = files["files"]

# verbosity indicator
# display user vars
util.log_lvl("user_vars:", config, "-verbose")
util.log_lvl(json.dumps(config["user_vars"], indent=4), config, "-verbose")

Expand All @@ -1614,6 +1635,10 @@ def main():
print(special_args, flush=True)
print(json.dumps(config, indent=4), flush=True)

# display tools
util.log_lvl("tools:", config, "-verbose")
util.log_lvl(json.dumps(config["tools"], indent=4), config, "-verbose")

# core scripts
scripts = {
"copy": copy,
Expand Down

0 comments on commit 58d069b

Please sign in to comment.