potiuk commented on code in PR #27829:
URL: https://github.com/apache/airflow/pull/27829#discussion_r1068681488


##########
dev/breeze/src/airflow_breeze/commands/minor_release_command.py:
##########
@@ -0,0 +1,183 @@
+# 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.
+from __future__ import annotations
+
+import os
+
+import click
+
+from airflow_breeze.utils.common_options import option_answer
+from airflow_breeze.utils.confirm import confirm_action
+from airflow_breeze.utils.console import console_print
+from airflow_breeze.utils.path_utils import AIRFLOW_SOURCES_ROOT
+from airflow_breeze.utils.run_utils import run_command
+
+CI = os.environ.get("CI")
+
+
+def create_branch(version_branch):
+    if CI:
+        console_print("Skipping creating branch in CI")
+        return
+    if confirm_action(f"Create version branch: {version_branch}?"):
+        run_command(["git", "checkout", "main"])
+        run_command(["git", "checkout", "-b", f"v{version_branch}-test"])
+        console_print(f"Created branch: v{version_branch}-test")
+
+
+def update_default_branch(version_branch):
+    if confirm_action("Update default branches?"):
+        console_print()
+        console_print("You need to update the default branch at:")
+        console_print("./dev/breeze/src/airflow_breeze/branch_defaults.py")
+        console_print("Change the following:")
+        console_print("AIRFLOW_BRANCH = 'main'")
+        console_print("DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH = 
'constraints-main'")
+        console_print()
+        console_print("To:")
+        console_print()
+        console_print(f"AIRFLOW_BRANCH = 'v{version_branch}-test'")
+        console_print(f"DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH = 
'constraints-{version_branch}'")
+
+
+def commit_changes(version_branch):
+    if CI:

Review Comment:
   Commiting changes could be done in CI as well.



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to