You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/06/05 01:41:01 UTC

[airflow] branch main updated: Doc: Use correct version in Chart docs (#16277)

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

kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 9c792ea  Doc: Use correct version in Chart docs (#16277)
9c792ea is described below

commit 9c792eabb9ed48a7b468e9a76b3662f20ad846cb
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Sat Jun 5 02:40:42 2021 +0100

    Doc: Use correct version in Chart docs (#16277)
    
    If a version is not specified it uses "devel" when building production docs
---
 docs/conf.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/docs/conf.py b/docs/conf.py
index 539ec05..7e2d958 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -80,7 +80,12 @@ elif PACKAGE_NAME.startswith('apache-airflow-providers-'):
     PACKAGE_VERSION = 'devel'
 elif PACKAGE_NAME == 'helm-chart':
     PACKAGE_DIR = os.path.join(ROOT_DIR, 'chart')
-    PACKAGE_VERSION = 'devel'  # TODO do we care? probably
+    CHART_YAML_FILE = os.path.join(PACKAGE_DIR, 'Chart.yaml')
+
+    with open(CHART_YAML_FILE) as chart_file:
+        chart_yaml_contents = yaml.load(chart_file, SafeLoader)
+
+    PACKAGE_VERSION = chart_yaml_contents['version']
 else:
     PACKAGE_DIR = None
     PACKAGE_VERSION = 'devel'