You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/10 20:13:41 UTC

[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #24951: Add `--clean-build` option for breeze build-docs

ephraimbuddy commented on code in PR #24951:
URL: https://github.com/apache/airflow/pull/24951#discussion_r917441562


##########
dev/breeze/src/airflow_breeze/commands/developer_commands.py:
##########
@@ -391,31 +393,46 @@ def start_airflow(
 @click.option('-d', '--docs-only', help="Only build documentation.", is_flag=True)
 @click.option('-s', '--spellcheck-only', help="Only run spell checking.", is_flag=True)
 @click.option(
-    '-p',
-    '--for-production',
-    help="Builds documentation for official release i.e. all links point to stable version.",
-    is_flag=True,
-)
-@click.option(
-    '-p',
     '--package-filter',
     help="List of packages to consider.",
     type=NotVerifiedBetterChoice(get_available_packages()),
     multiple=True,
 )
+@click.option(
+    '--clean-build',
+    help="Clean inventories of Inter-Sphinx documentation and generated APIs and sphinx artifacts "
+    "before the build - useful for a clean build.",
+    is_flag=True,
+)
+@click.option(
+    '--for-production',
+    help="Builds documentation for official release i.e. all links point to stable version. "
+    "Implies --clean-build",
+    is_flag=True,
+)
 def build_docs(
     verbose: bool,
     dry_run: bool,
     github_repository: str,
     docs_only: bool,
     spellcheck_only: bool,
     for_production: bool,
+    clean_build: bool,
     package_filter: Tuple[str],
 ):
     """Build documentation in the container."""
+    if for_production and not clean_build:
+        get_console().print("\n[warning]When building docs for production, clan-build is forced\n")

Review Comment:
   ```suggestion
           get_console().print("\n[warning]When building docs for production, clean-build is forced\n")
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org