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/05 19:48:30 UTC

[airflow] branch main updated: Push provider tags as a single command, not one per provider (#26163)

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

potiuk 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 09a0beb125 Push provider tags as a single command, not one per provider (#26163)
09a0beb125 is described below

commit 09a0beb12518c82a9dc3bb684b818112cd640f77
Author: Ash Berlin-Taylor <as...@apache.org>
AuthorDate: Mon Sep 5 20:48:12 2022 +0100

    Push provider tags as a single command, not one per provider (#26163)
    
    This makes this step much much quicker.
    
    Also don't hard-code the remote name as `apache` but find it from some
    common names (apache and origin for now)
---
 dev/provider_packages/tag_providers.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/dev/provider_packages/tag_providers.sh b/dev/provider_packages/tag_providers.sh
index 16e84d753a..53c861182e 100755
--- a/dev/provider_packages/tag_providers.sh
+++ b/dev/provider_packages/tag_providers.sh
@@ -18,11 +18,23 @@
 set -euo pipefail
 AIRFLOW_SOURCES="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../" && pwd)"
 
+# Check common named remotes for the upstream repo
+for remote in origin apache; do
+   git remote get-url --push "$remote" 2>/dev/null | grep -q git@github.com:apache/airflow && break
+   unset remote
+done
+
+: "${remote?Could not find remote configured to push to apache/airflow}"
+
+tags=()
 for file in "${AIRFLOW_SOURCES}/dist/"*.whl
 do
    if [[ ${file} =~ .*airflow_providers_(.*)-(.*)-py3.* ]]; then
         provider="providers-${BASH_REMATCH[1]}"
         tag="${provider//_/-}/${BASH_REMATCH[2]}"
-        (git tag "${tag}" && git push apache "${tag}") || true
+        { git tag "${tag}" && tags+=("$tag") ; } || true
    fi
 done
+if [[ -n "${tags:-}" && "${#tags}" -gt 0 ]]; then
+   git push $remote "${tags[@]}"
+fi