Skip to content

Commit

Permalink
Simplified file_merger.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kirgrim committed Jun 30, 2024
1 parent 0d7d2f5 commit d2819f2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_nano_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
python -m pip install jsbeautifier==1.15.1
- name: Build Nano JS
working-directory: ./chat_client/static
run: python ../../scripts/file_merger.py --weighted_dirs 1=['js'] --weighted_files 0=['nano_builder.js'] --skip_files meta.js klatchatNano.js --save_to js/klatchatNano.js --beautify 1
run: python ../../scripts/file_merger.py --weighted_dirs 1=[js] --weighted_files 0=[nano_builder.js] --skip_files meta.js klatchatNano.js --save_to js/klatchatNano.js --beautify 1
- name: Build Nano CSS
working-directory: ./chat_client/static
run: python ../../scripts/file_merger.py --weighted_dirs 1=['css'] --skip_files sidebar.css klatchatNano.css --save_to css/klatchatNano.css --beautify 0
run: python ../../scripts/file_merger.py --weighted_dirs 1=[css] --skip_files sidebar.css klatchatNano.css --save_to css/klatchatNano.css --beautify 0
- name: Push Version Change
uses: stefanzweifel/git-auto-commit-action@v5
with:
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Local configs
/configs/*.json
/configs/*.yml
/configs/*
kube_config

# Sandbox
Expand Down
3 changes: 2 additions & 1 deletion scripts/file_merger.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def __call__(self, parser, namespace, values, option_string=None):
setattr(namespace, self.dest, dict())
for value in values:
key, value = value.split("=")
value = eval(value)
if value.startswith("[") and value.endswith("]"):
value = value[1:-1].split(",")
getattr(namespace, self.dest)[key] = value


Expand Down

0 comments on commit d2819f2

Please sign in to comment.