You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ch...@apache.org on 2026/10/21 23:30:40 UTC

(kafka) branch trunk updated: MINOR: Stop staging LICENSE/NOTICE into kafka-site content dir (#23906)

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

chia7712 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new a3444d8b32b MINOR: Stop staging LICENSE/NOTICE into kafka-site content dir (#23906)
a3444d8b32b is described below

commit a3444d8b32beee97bd0afaa267a9c4180815de60
Author: Omnia Ibrahim <o....@gmail.com>
AuthorDate: Thu Oct 22 00:30:29 2026 +0100

    MINOR: Stop staging LICENSE/NOTICE into kafka-site content dir (#23906)
    
    Follow-up to KAFKA-21289 (#23833), which fixed `release.py stage-docs`
    for the Hugo-based kafka-site layout.
    
    The site-docs tar carries the repo's top-level `LICENSE` and `NOTICE` at
    its root. `stage-docs` extracts the tar with `tar xf ...
    --strip-components 1` straight into `content/en/<version>/`, so those
    two files get dumped into the  kafka-site content tree alongside the
    actual docs. They are not docs content and do not belong there — the
    previous release slot (`content/en/43`) has neither, and the javadoc
    tree already carries its own `legal/` license files under
    `static/<version>/javadoc/`.
    
    This was flagged on the 4.4 kafka-site PR, where `content/en/44/LICENSE`
    and `content/en/44/NOTICE` showed up as spurious additions and had to be
    removed by hand. Without this change they return on every `stage-docs`
    run.
    
    This patch drops `LICENSE` and `NOTICE` from the content directory after
    extraction, mirroring the existing post-extraction cleanup that moves
    `images/` out to `static/<version>/`.
    
    No behavior change for any other staged file.
    
    Reviewers: Chia-Ping Tsai <ch...@gmail.com>
---
 release/release.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/release/release.py b/release/release.py
index 2d8b84910b2..f263c56a94e 100644
--- a/release/release.py
+++ b/release/release.py
@@ -162,6 +162,14 @@ def command_stage_docs():
         static_images_path = os.path.join(static_docs_path, "images")
         cmd("Moving images to static assets", f"mkdir -p {static_images_path} && cp -R {content_images_path}/. {static_images_path} && rm -rf {content_images_path}", shell=True)
 
+    # LICENSE and NOTICE sit at the root of the site-docs tar and get dumped into
+    # content/en/<version> by the extract above, but they are not docs content and
+    # do not belong in the kafka-site content tree. Drop them after extraction.
+    for stray_file in ("LICENSE", "NOTICE"):
+        stray_path = os.path.join(content_docs_path, stray_file)
+        if os.path.exists(stray_path):
+            cmd(f"Removing stray {stray_file}", f"rm -f {stray_path}")
+
     javadocs_src_dir = os.path.join(repo_dir, "build", "docs", "javadoc")
 
     cmd("Copying javadocs", f"cp -R {javadocs_src_dir} {static_docs_path}")