From 49581b38499d0e00742b289ae177913493499fe6 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Wed, 22 Jan 2025 13:50:44 +0100 Subject: [PATCH] Add ui asset compilation to custom build target of Airflow package (#45928) Since we have now also the UI assets builds we should compile them as well. --- hatch_build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hatch_build.py b/hatch_build.py index f174df2a37576..baa6958c336ab 100644 --- a/hatch_build.py +++ b/hatch_build.py @@ -594,6 +594,8 @@ def clean(self, directory: str, versions: Iterable[str]) -> None: commands = [ ["rm -rf airflow/www/static/dist"], ["rm -rf airflow/www/node_modules"], + ["rm -rf airflow/ui/static/dist"], + ["rm -rf airflow/ui/node_modules"], ] for cmd in commands: run(cmd, cwd=work_dir.as_posix(), check=True, shell=True) @@ -607,10 +609,11 @@ def build_standard(self, directory: str, artifacts: Any, **build_data: Any) -> s work_dir = Path(self.root) commands = [ ["pre-commit run --hook-stage manual compile-www-assets --all-files"], + ["pre-commit run --hook-stage manual compile-ui-assets --all-files"], ] for cmd in commands: run(cmd, cwd=work_dir.as_posix(), check=True, shell=True) - dist_path = work_dir / "airflow" / "www" / "static" / "dist" + dist_path = work_dir / "airflow" / "ui" / "static" / "dist" return dist_path.resolve().as_posix() def get_git_version(self) -> str: