Skip to content

Commit

Permalink
added skip-auto-updae parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
aho-dips committed Feb 8, 2024
1 parent 7c3eed9 commit 4d83733
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion smud-cli/functions-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,21 @@ set_origin()

merge_upstream()
{
if [ "$skip_auto_update" ]; then
return
fi
print_not_silent "${gray}Merging upstream into local branch...$reset"
merge_upstream_command="git merge upstream/main"
run_command merge-upstream --command-from-var=merge_upstream_command --return-var=dummy --debug-title='Merging upstream repository into local branch' || return
}

fetch_origin()
{
if [ "$skip_auto_update" ]; then
return
fi
print_not_silent "${gray}Fetching origin...$reset"
fetch_origin_command="git fetch origin"
run_command fetch-origin --command-from-var=fetch_origin_command --return-var=dummy --debug-title='Fetching origin' || return
}

Expand Down Expand Up @@ -147,7 +156,7 @@ init()
fetch_upstream
fi

if [ ! -n "$remote_origin" ]; then
if [ ! "$remote_origin" ]; then
print_not_silent "Setting and fetching origin"
set_origin
fetch_origin
Expand Down
1 change: 1 addition & 0 deletions smud-cli/include.sh
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ first_param="$3"
parse_arguments ARGS $@
curr_dir=$(pwd)
get_arg upstream_url '--upstream-url,--upstream,--up-url,-up-url'
get_arg skip_auto_update '--skip-auto-update,--skip-auto'
get_arg examples '--examples,--ex,-ex'
get_arg help '--help,-?,-h' "$examples"
get_arg separator '--separator,-sep'
Expand Down

0 comments on commit 4d83733

Please sign in to comment.