mirror of
https://github.com/pi-hole/pi-hole
synced 2025-02-12 08:02:36 +00:00
Using more user-friendly messages on git describe
failure
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
parent
0ae50eab87
commit
254b67bca3
@ -202,7 +202,7 @@ compare_local_version_to_git_version() {
|
|||||||
if git status &> /dev/null; then
|
if git status &> /dev/null; then
|
||||||
# The current version the user is on
|
# The current version the user is on
|
||||||
local local_version
|
local local_version
|
||||||
local_version=$(git describe --tags --abbrev=0 2>&1);
|
local_version=$(git describe --tags --abbrev=0 2> /dev/null);
|
||||||
# What branch they are on
|
# What branch they are on
|
||||||
local local_branch
|
local local_branch
|
||||||
local_branch=$(git rev-parse --abbrev-ref HEAD);
|
local_branch=$(git rev-parse --abbrev-ref HEAD);
|
||||||
@ -213,7 +213,13 @@ compare_local_version_to_git_version() {
|
|||||||
local local_status
|
local local_status
|
||||||
local_status=$(git status -s)
|
local_status=$(git status -s)
|
||||||
# echo this information out to the user in a nice format
|
# echo this information out to the user in a nice format
|
||||||
log_write "${TICK} Version: ${local_version}"
|
if [ ${local_version} ]; then
|
||||||
|
log_write "${TICK} Version: ${local_version}"
|
||||||
|
elif [ -n "${DOCKER_VERSION}" ]; then
|
||||||
|
log_write "${TICK} Version: Pi-hole Docker Container ${COL_BOLD}${DOCKER_VERSION}${COL_NC}"
|
||||||
|
else
|
||||||
|
log_write "${CROSS} Version: not detected"
|
||||||
|
fi
|
||||||
|
|
||||||
# Print the repo upstreams
|
# Print the repo upstreams
|
||||||
remotes=$(git remote -v)
|
remotes=$(git remote -v)
|
||||||
|
Loading…
Reference in New Issue
Block a user