Skip to content

Commit

Permalink
fix: add build ui to additional_packaging.py to support build on CI (#17
Browse files Browse the repository at this point in the history
)
  • Loading branch information
vtsvetkov-splunk authored Nov 27, 2024
1 parent d64c688 commit a073636
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
ucc-gen build
./scripts/build_ui.sh
ucc-gen package --path output/Splunk_TA_Example
```

Expand Down
9 changes: 9 additions & 0 deletions additional_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ def additional_packaging(addon_name: str) -> None:
file_to_remove = f"output/{addon_name}/lib/__pycache__/socks.cpython-37.pyc"
if path.exists(file_to_remove):
os.remove(file_to_remove)

build_ui_script = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "scripts", "build_ui.sh"
)
if path.exists(build_ui_script):
os.system(f"chmod +x {build_ui_script}")
return_code = os.system(build_ui_script)
if return_code != 0:
os._exit(os.WEXITSTATUS(return_code))

0 comments on commit a073636

Please sign in to comment.