potiuk commented on a change in pull request #12786:
URL: https://github.com/apache/airflow/pull/12786#discussion_r535678204
##########
File path: scripts/ci/libraries/_initialization.sh
##########
@@ -134,8 +134,8 @@ function initialization::initialize_base_variables() {
# otherwise it will use files/airflow-breeze-config/init.sh
export INIT_SCRIPT_FILE=${INIT_SCRIPT_FILE:=""}
- # Read airflow version from the version.py
- AIRFLOW_VERSION=$(grep version "${AIRFLOW_SOURCES}/airflow/version.py" |
awk '{print $3}' | sed "s/['+]//g")
+ # Read airflow version from the setup.py.
+ AIRFLOW_VERSION=$(python "${AIRFLOW_SOURCES}/setup.py" --version)
Review comment:
I'd prefer not to run Python here if possible. While this is a
reasonable expectation that Python is installed in the hos, there are still
some cases where people will have python2 by default for example and i would
rather keep it bash only. There is another case in the future where we will use
those scripts in code spaces environment and vs code to run docker-only
environment and i would not like to have to depend on Python there.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]