mirror of
https://github.com/Bhupesh-V/ugit.git
synced 2026-09-10 07:26:20 -04:00
🚸 improve support for running ugit via docker (#68)
- dont update ugit inside docker - instead of opening browser print the guide url
This commit is contained in:
parent
7be63fc4c5
commit
f876a5060c
13
ugit
13
ugit
|
|
@ -449,6 +449,12 @@ get_changelog() {
|
|||
}
|
||||
|
||||
ugit_update() {
|
||||
if [ -n "${UGIT_RUNNING_IN_DOCKER-}" ] && [ "$UGIT_RUNNING_IN_DOCKER" = true ]; then
|
||||
printf "%s\n\n" "You are running version ${VERSION} of ugit via Docker. Please pull the latest docker image to update."
|
||||
printf "\t%s\n" "${BOLD_ORG_FG}docker pull bhupeshimself/ugit${RESET}"
|
||||
return
|
||||
fi
|
||||
|
||||
printf "%s\n" "Checking for updates ..."
|
||||
curl -s -L "$SCRIPT_URL" > "$TMP_FILE"
|
||||
NEW_VER=$(grep "^VERSION" "$TMP_FILE" | awk -F'[="]' '{print $3}')
|
||||
|
|
@ -468,7 +474,12 @@ ugit_update() {
|
|||
}
|
||||
|
||||
open_guide() {
|
||||
GUIDE="https://bhupesh.gitbook.io/notes/git/how-to-undo-anything-in-git"
|
||||
GUIDE="https://til.bhupesh.me/git/how-to-undo-anything-in-git"
|
||||
|
||||
if [ -n "${UGIT_RUNNING_IN_DOCKER-}" ] && [ "$UGIT_RUNNING_IN_DOCKER" = true ]; then
|
||||
printf "%s\n" "You can find how ugit does its magic at: ${BOLD_ORG_FG}${GUIDE}${RESET}"
|
||||
return
|
||||
fi
|
||||
|
||||
case "$OSTYPE" in
|
||||
darwin*)
|
||||
|
|
|
|||
Loading…
Reference in a new issue