mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
feat: Add --force flag to skip pre-push checks
This commit is contained in:
parent
57304536bf
commit
110c63ae95
1 changed files with 12 additions and 5 deletions
|
@ -81,15 +81,22 @@ def main():
|
|||
parser.add_argument(
|
||||
"--dry-run", action="store_true", help="Print each step without actually executing them"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--force", action="store_true", help="Skip pre-push checks"
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
dry_run = args.dry_run
|
||||
force = args.force
|
||||
|
||||
# Perform checks before proceeding
|
||||
check_branch()
|
||||
check_working_directory_clean()
|
||||
check_main_branch_up_to_date()
|
||||
check_ok_to_push()
|
||||
# Perform checks before proceeding unless --force is used
|
||||
if not force:
|
||||
check_branch()
|
||||
check_working_directory_clean()
|
||||
check_main_branch_up_to_date()
|
||||
check_ok_to_push()
|
||||
else:
|
||||
print("Skipping pre-push checks due to --force flag.")
|
||||
|
||||
new_version_str = args.new_version
|
||||
if not re.match(r"^\d+\.\d+\.\d+$", new_version_str):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue