You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/09/08 20:58:16 UTC

[airflow] branch v2-4-test updated: Skip overriding version from parameter with the one from tag (#26244)

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

potiuk pushed a commit to branch v2-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v2-4-test by this push:
     new 047f9d9349 Skip overriding version from parameter with the one from tag (#26244)
047f9d9349 is described below

commit 047f9d9349dd70ea5df398a89c56dd8cf31437da
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Thu Sep 8 21:29:00 2022 +0200

    Skip overriding version from parameter with the one from tag (#26244)
    
    Since we are not always updating the version suffix in code
    (rc1/rc2/b1/b2), the tag specified via --tag-build prefix should
    override the one in code rathe than the other way round.
    
    So what's left now - we will just print warning if the suffix does
    not match.
    
    (cherry picked from commit 9cf6f6a63d923e01fc7a3a634a0fa75f43c4c198)
---
 scripts/in_container/run_prepare_airflow_packages.sh | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/scripts/in_container/run_prepare_airflow_packages.sh b/scripts/in_container/run_prepare_airflow_packages.sh
index a2594bb4e4..0ba7871494 100755
--- a/scripts/in_container/run_prepare_airflow_packages.sh
+++ b/scripts/in_container/run_prepare_airflow_packages.sh
@@ -54,18 +54,9 @@ function prepare_airflow_packages() {
             tag_build=('egg_info' '--tag-build' "${VERSION_SUFFIX_FOR_PYPI}")
         else
             if [[ ${AIRFLOW_VERSION} != *${VERSION_SUFFIX_FOR_PYPI} ]]; then
-                if [[ $AIRFLOW_VERSION =~ ^[0-9\.]+([a-z0-9]*)$ ]]; then
-                    echo
-                    echo "${COLOR_YELLOW}The requested PyPI suffix ${VERSION_SUFFIX_FOR_PYPI} does not match the one in ${AIRFLOW_VERSION}. Overriding it with one from ${AIRFLOW_VERSION}.${COLOR_RESET}"
-                    echo
-                    VERSION_SUFFIX_FOR_PYPI="${BASH_REMATCH[1]}"
-                    export VERSION_SUFFIX_FOR_PYPI
-                else
-                    echo
-                    echo "${COLOR_RED}The ${AIRFLOW_VERSION} does not follow the right version pattern 'X.Y.Zsuffix'. Quitting.${COLOR_RESET}"
-                    echo
-                    exit 1
-                fi
+                echo
+                echo "${COLOR_YELLOW}The requested PyPI suffix ${VERSION_SUFFIX_FOR_PYPI} does not match the one in ${AIRFLOW_VERSION}. Overriding it with one from ${VERSION_SUFFIX_FOR_PYPI}.${COLOR_RESET}"
+                echo
             fi
         fi
     fi