potiuk commented on a change in pull request #7391: [AIRFLOW-6663] Prepare 
backporting packages
URL: https://github.com/apache/airflow/pull/7391#discussion_r377100501
 
 

 ##########
 File path: scripts/ci/ci_prepare_backport_packages.sh
 ##########
 @@ -0,0 +1,71 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -euo pipefail
+
+MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+
+export AIRFLOW_CI_SILENT=${AIRFLOW_CI_SILENT:="true"}
+
+export PYTHON_VERSION=${PYTHON_VERSION:-3.6}
+
+# shellcheck source=scripts/ci/_utils.sh
+. "${MY_DIR}/_utils.sh"
+
+basic_sanity_checks
+
+script_start
+
+cd "${AIRFLOW_SOURCES}"
+
+rm -rf dist/*
+rm -rf -- *.egg-info
+
+BACKPORT_PACKAGES=$(python setup.py --list-backport-packages)
+
+cp -v MANIFEST.in MANIFEST.in.bak
+cp MANIFEST-packages.in MANIFEST.in
+
+function cleanup {
+    cp MANIFEST.in.bak MANIFEST.in
+    rm MANIFEST.in.bak
+}
+
+trap cleanup EXIT
+
+for BACKPORT_PACKAGE in ${BACKPORT_PACKAGES}
+do
+    echo
+    echo 
"-----------------------------------------------------------------------------------"
+    echo " Preparing backporting package ${BACKPORT_PACKAGE}"
+    echo 
"-----------------------------------------------------------------------------------"
+    echo
+    python setup.py --provider-package "${BACKPORT_PACKAGE}" sdist bdist 
bdist_wheel >/dev/null
+done
+
+python setup.py --provider-package providers sdist bdist bdist_wheel >/dev/null
+
+DUMP_FILE="/tmp/airflow_provider_packages_$(date +"%Y%m%d-%H%M%S").tar.gz"
+
+tar -cvzf "${DUMP_FILE}" "dist"
+
+echo "Packages are prepared in ${DUMP_FILE}"
+
+curl -F "file=@${DUMP_FILE}" https://file.io
 
 Review comment:
   I noticed file.io is not super-stable. Some links start to return 404 
earlier than after 14 days.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to