Skip to content

Commit

Permalink
Add ui asset compilation to custom build target of Airflow package (a…
Browse files Browse the repository at this point in the history
…pache#45928)

Since we have now also the UI assets builds we should compile them
as well.
  • Loading branch information
potiuk authored Jan 22, 2025
1 parent 11c8667 commit 49581b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit 49581b3

Please sign in to comment.