Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/README_RELEASE_AIRFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,30 +456,41 @@ 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"])
run_command([f"ls {version}"])
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")
Expand Down Expand Up @@ -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)
Expand Down
Loading