Skip to content

Commit

Permalink
chore: improve error handling and output in scripts/update
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi committed Feb 6, 2025
1 parent 52dfd98 commit 8a7f8cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/update
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ source "${project_root}/scripts/lib/shared.sh"
source "${project_root}/.env"

# pixelfed/pixelfed branch/tag
pixelfed_release="$1"
pixelfed_release="${1:?missing argument, the pixelfed release - see https://jippi.github.io/docker-pixelfed/customize/tags/#pixelfed-version}"

# jippi/docker-pixelfed branch/tag
docker_release="${2-main}"

action_start_newline "fetching docker updates"
action_start_newline "fetching jippi/docker-pixelfed git updates"
git fetch origin || action_error_exit "failed"
action_ok "OK"
echo

action_start_newline "changing to release branch [${docker_release}]"
action_start_newline "changing to jippi/docker-pixelfed branch [${docker_release}]"
git checkout "${docker_release}" || action_error_exit "could not checkout branch ${docker_release}"
action_ok "OK"
echo

action_start_newline "pulling updates from remote branch [${docker_release}]"
action_start_newline "pulling jippi/docker-pixelfed updates from branch [${docker_release}]"
git pull || action_error_exit "could not update branch ${docker_release}"
action_ok "OK"
echo
Expand Down

0 comments on commit 8a7f8cf

Please sign in to comment.