poorvirohidekar commented on code in PR #38447:
URL: https://github.com/apache/airflow/pull/38447#discussion_r1538110715
##########
dev/breeze/src/airflow_breeze/commands/release_management_commands.py:
##########
@@ -949,6 +950,72 @@ def run_generate_constraints_in_parallel(
)
+@release_management.command(
+ name="tag-providers",
+ help="Generates tags for airflow provider releases.",
+)
+@option_dry_run
+@option_verbose
+def tag_providers():
+ found_remote = None
+ remotes = ["origin", "apache"]
+ for remote in remotes:
+ try:
+ command = ["git", "remote", "get-url", "--push",
shlex.quote(remote)]
+ result = subprocess.run(command, stdout=subprocess.PIPE,
stderr=subprocess.DEVNULL, text=True)
+ if "apache/airflow.git" in result.stdout:
+ found_remote = remote
+ break
+ except subprocess.CalledProcessError:
+ pass
+
+ if found_remote is None:
+ raise ValueError("Could not find remote configured to push to
apache/airflow")
+
+ tags = []
+ for file in os.listdir(os.path.join(SOURCE_DIR_PATH, "dist")):
+ if file.endswith(".whl"):
+ match = re.match(r".*airflow_providers_(.*)-(.*)-py3.*", file)
+ if match:
+ provider = f"providers-{match.group(1).replace('_', '-')}"
+ tag = f"{provider}/{match.group(2)}"
+ try:
+ subprocess.run(
Review Comment:
@potiuk I have changed it to use run_command.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]