feat: remove git update option from update script and ensure repository check is always performed
Some checks failed
Nix Format Check / check-format (push) Failing after 39s
Some checks failed
Nix Format Check / check-format (push) Failing after 39s
This commit is contained in:
parent
42c2b93cdf
commit
0515dc0842
@ -17,7 +17,6 @@ def help_message():
|
|||||||
printfe("green", " --ansible, -A Upgrade Ansible packages.")
|
printfe("green", " --ansible, -A Upgrade Ansible packages.")
|
||||||
printfe("green", " --ansible-verbose Upgrade Ansible packages with verbose output. (-vvv)")
|
printfe("green", " --ansible-verbose Upgrade Ansible packages with verbose output. (-vvv)")
|
||||||
printfe("green", " --full-speed, -F Upgrade packages and use all available cores for compilation. (Default: 8 cores)")
|
printfe("green", " --full-speed, -F Upgrade packages and use all available cores for compilation. (Default: 8 cores)")
|
||||||
printfe("green", " --git, -G Check and update dotfiles Git repository.")
|
|
||||||
printfe("green", " --help, -h Display this help message.")
|
printfe("green", " --help, -h Display this help message.")
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@ -174,7 +173,6 @@ def main():
|
|||||||
parser.add_argument("--ansible", "-A", action="store_true", help="Upgrade Ansible packages")
|
parser.add_argument("--ansible", "-A", action="store_true", help="Upgrade Ansible packages")
|
||||||
parser.add_argument("--ansible-verbose", action="store_true", help="Upgrade Ansible packages with verbose output")
|
parser.add_argument("--ansible-verbose", action="store_true", help="Upgrade Ansible packages with verbose output")
|
||||||
parser.add_argument("--full-speed", "-F", action="store_true", help="Use all available cores")
|
parser.add_argument("--full-speed", "-F", action="store_true", help="Use all available cores")
|
||||||
parser.add_argument("--git", "-G", action="store_true", help="Check and update dotfiles Git repository")
|
|
||||||
parser.add_argument("--help", "-h", action="store_true", help="Display help message")
|
parser.add_argument("--help", "-h", action="store_true", help="Display help message")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
@ -183,21 +181,19 @@ def main():
|
|||||||
return help_message()
|
return help_message()
|
||||||
|
|
||||||
# If no specific option provided, run all
|
# If no specific option provided, run all
|
||||||
if not args.ha and not args.ansible and not args.ansible_verbose and not args.git:
|
if not args.ha and not args.ansible and not args.ansible_verbose:
|
||||||
args.ha = True
|
args.ha = True
|
||||||
args.ansible = True
|
args.ansible = True
|
||||||
args.git = True
|
|
||||||
|
|
||||||
# Git repository update
|
|
||||||
if args.git:
|
|
||||||
if not check_git_repository():
|
|
||||||
printfe("red", "Failed to check or update dotfiles repository.")
|
|
||||||
return 1
|
|
||||||
|
|
||||||
# If ansible_verbose is set, also set ansible
|
# If ansible_verbose is set, also set ansible
|
||||||
if args.ansible_verbose:
|
if args.ansible_verbose:
|
||||||
args.ansible = True
|
args.ansible = True
|
||||||
|
|
||||||
|
# Always check git repository first
|
||||||
|
if not check_git_repository():
|
||||||
|
printfe("red", "Failed to check or update dotfiles repository.")
|
||||||
|
return 1
|
||||||
|
|
||||||
# Set cores and jobs based on full-speed flag
|
# Set cores and jobs based on full-speed flag
|
||||||
if args.full_speed:
|
if args.full_speed:
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user