diff --git a/dev/README_RELEASE_AIRFLOW.md b/dev/README_RELEASE_AIRFLOW.md index 51465191f3048..678d29fde79b4 100644 --- a/dev/README_RELEASE_AIRFLOW.md +++ b/dev/README_RELEASE_AIRFLOW.md @@ -314,7 +314,7 @@ export GPG_TTY=$(tty) # Set Version export VERSION=3.1.3 export VERSION_SUFFIX=rc1 -export VERSION_RC=${VERSION}${VERSION_RC} +export VERSION_RC=${VERSION}${VERSION_SUFFIX} export VERSION_BRANCH=3-1 export TASK_SDK_VERSION=1.1.3 export TASK_SDK_VERSION_RC=${TASK_SDK_VERSION}${VERSION_SUFFIX} diff --git a/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py b/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py index 1f3da43717c53..e993209fe3bbf 100644 --- a/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py +++ b/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py @@ -456,13 +456,18 @@ def clone_asf_repo(version, repo_root): console_print("[success]Cloned ASF repo successfully") -def move_artifacts_to_svn(version, task_sdk_version, repo_root): +def move_artifacts_to_svn( + version, version_without_rc, task_sdk_version, task_sdk_version_without_rc, repo_root +): if confirm_action("Do you want to move artifacts to SVN?"): os.chdir(f"{repo_root}/asf-dist/dev/airflow") run_command(["svn", "mkdir", f"{version}"], check=True) - run_command(f"mv {repo_root}/dist/*{version}* {version}/", check=True, shell=True) + run_command(f"mv {repo_root}/dist/*{version_without_rc}* {version}/", check=True, shell=True) + run_command(["svn", "mkdir", f"task-sdk/{task_sdk_version}"]) run_command( - f"mv {repo_root}/dist/*{task_sdk_version}* task-sdk/{task_sdk_version}/", check=True, shell=True + f"mv {repo_root}/dist/*{task_sdk_version_without_rc}* task-sdk/{task_sdk_version}/", + check=True, + shell=True, ) console_print("[success]Moved artifacts to SVN:") run_command(["ls"]) @@ -470,16 +475,22 @@ def move_artifacts_to_svn(version, task_sdk_version, repo_root): run_command([f"ls task-sdk/{task_sdk_version}"]) -def push_artifacts_to_asf_repo(version, repo_root): +def push_artifacts_to_asf_repo(version, task_sdk_version, repo_root): if confirm_action("Do you want to push artifacts to ASF repo?"): - console_print("Files to push to svn:") + console_print("Airflow Version Files to push to svn:") if not get_dry_run(): os.chdir(f"{repo_root}/asf-dist/dev/airflow/{version}") run_command(["ls"]) confirm_action("Do you want to continue?", abort=True) run_command("svn add *", check=True, shell=True) + console_print("Task SDK Version Files to push to svn:") + if not get_dry_run(): + os.chdir(f"{repo_root}/asf-dist/dev/airflow/task-sdk/{task_sdk_version}") + run_command(["ls"]) + confirm_action("Do you want to continue?", abort=True) + run_command("svn add *", check=True, shell=True) run_command( - ["svn", "commit", "-m", f"Add artifacts for Airflow {version}"], + ["svn", "commit", "-m", f"Add artifacts for Airflow {version} and Task SDK {task_sdk_version}"], check=True, ) console_print("[success]Files pushed to svn") @@ -738,9 +749,11 @@ def publish_release_candidate( # Clone the asf repo clone_asf_repo(version, airflow_repo_root) # Move artifacts to SVN - move_artifacts_to_svn(version, task_sdk_version, airflow_repo_root) + move_artifacts_to_svn( + version, version_without_rc, task_sdk_version, task_sdk_version_without_rc, airflow_repo_root + ) # Push the artifacts to the asf repo - push_artifacts_to_asf_repo(version, airflow_repo_root) + push_artifacts_to_asf_repo(version, task_sdk_version, airflow_repo_root) # Remove old releases remove_old_releases(version, airflow_repo_root)