Skip to content

Commit

Permalink
web frontend: add command line option for quick builds during debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
maul-esel committed Dec 17, 2024
1 parent 1eb3b9d commit a329af9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions trunk/source/WebsiteStatic/scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def parse_args() -> argparse.Namespace:
parser.add_argument(
"--production", action="store_true", help="build site for deployment"
)
parser.add_argument(
"--skip-settings", action="store_true", help="skip rebuilding settings (useful during debugging)"
)
return parser.parse_args()
except argparse.ArgumentError as exc:
print(exc.message + "\n" + exc.argument)
Expand All @@ -50,13 +53,15 @@ def copy_webinterface_config(production_build):
shutil.copyfile(src, tgt)


def build(production_build=False):
def build(production_build=False, skip_settings=False):
# check if external tools are available
get_ultimate_cli()
if not skip_settings:
get_ultimate_cli()
get_jekyll_cli()

# create settings JSON for webinterface
build_all_settings()
if not skip_settings:
build_all_settings()

# copy and index examples for webinterface
clean_examples()
Expand All @@ -72,4 +77,4 @@ def build(production_build=False):

if __name__ == "__main__":
args = parse_args()
build(args.production)
build(args.production, args.skip_settings)

0 comments on commit a329af9

Please sign in to comment.