This is an automated email from the ASF dual-hosted git repository.

ebenizzy pushed a commit to branch elijah/apache_script_fixes
in repository https://gitbox.apache.org/repos/asf/burr.git

commit baa78e3d7c9b0e7a80b09f9dec58eb017b07ec8e
Author: Elijah ben Izzy <[email protected]>
AuthorDate: Thu Jan 8 15:08:02 2026 -0800

    WIP
---
 burr/cli/__main__.py      | 10 ++++++----
 pyproject.toml            |  2 +-
 scripts/apache_release.py | 20 +++++++++-----------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/burr/cli/__main__.py b/burr/cli/__main__.py
index 109eb835..aeb56f7d 100644
--- a/burr/cli/__main__.py
+++ b/burr/cli/__main__.py
@@ -132,7 +132,8 @@ def cli():
     pass
 
 
-def _build_ui():
+def run_build_ui_bash_commands():
+    """Execute the bash commands to build UI artifacts."""
     cmd = "npm install --prefix telemetry/ui"
     _command(cmd, capture_output=False)
     cmd = "npm run build --prefix telemetry/ui"
@@ -146,12 +147,13 @@ def _build_ui():
     _command(cmd, capture_output=False)
 
 
[email protected]()
[email protected](name="build-ui")
 def build_ui():
+    """Build the UI artifacts from source."""
     git_root = _get_git_root()
     logger.info("UI build: using project root %s", git_root)
     with cd(git_root):
-        _build_ui()
+        run_build_ui_bash_commands()
 
 
 BACKEND_MODULES = {
@@ -246,7 +248,7 @@ def build_and_publish(prod: bool, no_wipe_dist: bool):
     git_root = _get_git_root()
     with cd(git_root):
         logger.info("Building UI -- this may take a bit...")
-        _build_ui()
+        build_ui()
         logger.info("Built UI!")
         if not no_wipe_dist:
             logger.info("Wiping dist/ directory for a clean publish.")
diff --git a/pyproject.toml b/pyproject.toml
index 7b8da0fa..e6e61e37 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -21,7 +21,7 @@ build-backend = "flit_core.buildapi"
 
 [project]
 name = "apache-burr"
-version = "0.40.2"
+version = "0.41.0"
 dependencies = [] # yes, there are none
 requires-python = ">=3.9"
 authors = [
diff --git a/scripts/apache_release.py b/scripts/apache_release.py
index 4edba961..27cdb921 100644
--- a/scripts/apache_release.py
+++ b/scripts/apache_release.py
@@ -401,7 +401,7 @@ def _build_sdist_from_git(version: str, output_dir: str = 
"dist") -> str:
 
 
 def _build_ui_artifacts() -> None:
-    """Build UI artifacts using burr-admin-build-ui."""
+    """Build UI artifacts using burr's build function."""
     print("Building UI artifacts...")
 
     ui_build_dir = "burr/tracking/server/build"
@@ -410,18 +410,16 @@ def _build_ui_artifacts() -> None:
     if os.path.exists(ui_build_dir):
         shutil.rmtree(ui_build_dir)
 
-    # Check for burr-admin-build-ui
-    if shutil.which("burr-admin-build-ui") is None:
-        _fail("burr-admin-build-ui not found. Install with: pip install -e 
.[cli]")
-
-    # Build UI
-    env = os.environ.copy()
-    env["BURR_PROJECT_ROOT"] = os.getcwd()
-
+    # Import and call burr's build UI function directly
+    print("  Running burr's UI build...")
     try:
-        subprocess.run(["burr-admin-build-ui"], check=True, env=env, 
capture_output=True)
+        from burr.cli.__main__ import run_build_ui_bash_commands
+
+        run_build_ui_bash_commands()
         print("  ✓ UI artifacts built successfully")
-    except subprocess.CalledProcessError as e:
+    except ImportError as e:
+        _fail(f"Could not import burr's build function. Make sure you're in 
the project root: {e}")
+    except Exception as e:
         _fail(f"Error building UI: {e}")
 
     # Verify

Reply via email to