potiuk commented on code in PR #32495:
URL: https://github.com/apache/airflow/pull/32495#discussion_r1258614113
##########
dev/breeze/src/airflow_breeze/commands/developer_commands.py:
##########
@@ -405,6 +408,52 @@ def build_docs(
sys.exit(process.returncode)
[email protected](name="publish-docs")
[email protected]("-d", "--disable-checks", help="Disables extra checks.",
is_flag=True)
[email protected]("-s", "--override-versioned", help="Overrides versioned
directories.", is_flag=True)
[email protected](
+ "-s", "--airflow-site-directory", help="Local directory path of cloned
airflow-site repo.", required=True
+)
[email protected](
+ "--package-filter",
+ help="List of packages to consider.",
+ type=NotVerifiedBetterChoice(get_available_documentation_packages()),
+ multiple=True,
+)
+@option_verbose
+@option_dry_run
+def publish_docs(
+ disable_checks: bool,
+ override_versioned: bool,
+ airflow_site_directory: bool,
+ package_filter: tuple[str],
+):
+ """Publishes documentation to airflow-site."""
+ if not os.path.isdir(airflow_site_directory):
+ get_console().print(
+ "\n[error]location pointed by airflow_site_dir is not valid. "
+ "Provide the path of cloned airflow-site repo\n"
+ )
+
+ # set AIRFLOW_SITE_DIR env variable
+ os.environ["AIRFLOW_SITE_DIR"] = airflow_site_directory
Review Comment:
Another comment: You do not need to do that. the AIRLFOW_SITE_DIRECTORY
variable should be defined in click option. Click option has `envvar` field and
you can set env variable there. So we should revert the behaviour:
Instead of relying on `AIRFLOW_SITE_DRECTORY` in env, the directory can be
set either by `AIRLFOW_SITE_DIRECTORY` or by `--airflow-site-directory` flag
and then it should be passed directy to (modified) AirlfowDocsBuilder as
parameter.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]