feat(flow): add dotfiles
This commit is contained in:
parent
4d895b2c52
commit
35a9e08a7e
@ -26,6 +26,27 @@ SPEC=(
|
||||
"end"
|
||||
"end"
|
||||
|
||||
"command;dotfiles;Manage repository dotfiles and git submodules"
|
||||
"command;init;Initialize and set up all submodules"
|
||||
"note;Equivalent to: git submodule update --init --recursive"
|
||||
"end"
|
||||
"command;pull;Update all submodules to latest remote commits"
|
||||
"note;Equivalent to: git submodule update --remote --recursive"
|
||||
"end"
|
||||
"command;urls;Synchronize submodule URLs"
|
||||
"note;Equivalent to: git submodule sync --recursive"
|
||||
"end"
|
||||
"command;reset;Reset submodules to the recorded commits"
|
||||
"note;Equivalent to: git submodule update --init --recursive --force"
|
||||
"end"
|
||||
"command;status;Show current submodule status"
|
||||
"note;Equivalent to: git submodule status --recursive"
|
||||
"end"
|
||||
"command;all;Run URLs sync, initialization, and remote update in one step"
|
||||
"note;Equivalent to: git submodule sync --recursive && git submodule update --init --recursive && git submodule update --remote --recursive"
|
||||
"end"
|
||||
"end"
|
||||
|
||||
"command;create;Create and start a new development container"
|
||||
"argument;image,i;required;type:option;help:Container image to use (with optional tag)"
|
||||
"argument;project,p;type:option;help:Path to local project directory"
|
||||
@ -154,6 +175,42 @@ cmd() {
|
||||
barg_usage
|
||||
}
|
||||
|
||||
cmd_dotfiles_init() {
|
||||
echo "[dotfiles] Initializing submodules..."
|
||||
git submodule update --init --recursive
|
||||
}
|
||||
|
||||
cmd_dotfiles_pull() {
|
||||
echo "[dotfiles] Updating submodules to latest remote commits..."
|
||||
git submodule update --remote --recursive
|
||||
}
|
||||
|
||||
cmd_dotfiles_urls() {
|
||||
echo "[dotfiles] Syncing submodule URLs..."
|
||||
git submodule sync --recursive
|
||||
}
|
||||
|
||||
cmd_dotfiles_reset() {
|
||||
echo "[dotfiles] Resetting submodules to recorded commits..."
|
||||
git submodule update --init --recursive --force
|
||||
}
|
||||
|
||||
cmd_dotfiles_status() {
|
||||
echo "[dotfiles] Submodule status:"
|
||||
git submodule status --recursive
|
||||
}
|
||||
|
||||
cmd_dotfiles_all() {
|
||||
echo "[dotfiles] Syncing URLs..."
|
||||
git submodule sync --recursive
|
||||
|
||||
echo "[dotfiles] Initializing submodules..."
|
||||
git submodule update --init --recursive
|
||||
|
||||
echo "[dotfiles] Updating submodules to latest remote commits..."
|
||||
git submodule update --remote --recursive
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2154,SC2155
|
||||
cmd_enter() {
|
||||
# VARS: user_arg, namespace_arg, platform_arg, target_arg, session_arg, no_tmux_arg, dry_run_arg, ssh_args_arg
|
||||
|
||||
Loading…
Reference in New Issue
Block a user