mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24: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(
|
parser.add_argument(
|
||||||
"--dry-run", action="store_true", help="Print each step without actually executing them"
|
"--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()
|
args = parser.parse_args()
|
||||||
dry_run = args.dry_run
|
dry_run = args.dry_run
|
||||||
|
force = args.force
|
||||||
|
|
||||||
# Perform checks before proceeding
|
# Perform checks before proceeding unless --force is used
|
||||||
check_branch()
|
if not force:
|
||||||
check_working_directory_clean()
|
check_branch()
|
||||||
check_main_branch_up_to_date()
|
check_working_directory_clean()
|
||||||
check_ok_to_push()
|
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
|
new_version_str = args.new_version
|
||||||
if not re.match(r"^\d+\.\d+\.\d+$", new_version_str):
|
if not re.match(r"^\d+\.\d+\.\d+$", new_version_str):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue