File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,9 +62,16 @@ get_version_info() {
6262 fi
6363 cd /opt/sparkdock
6464 local current_branch=$( git rev-parse --abbrev-ref HEAD)
65- local current_version =$( git rev-parse --short HEAD)
65+ local local_version =$( git rev-parse --short HEAD)
6666 local last_commit_date=$( git log -1 --format=%cd --date=format:' %Y-%m-%d %H:%M:%S' )
67- echo " Version: ${current_version} (${current_branch} )"
67+
68+ # Get remote version (fetch quietly to get latest remote info)
69+ local remote_version=" unknown"
70+ if git fetch origin " ${current_branch} " -q 2> /dev/null; then
71+ remote_version=$( git rev-parse --short " origin/${current_branch} " 2> /dev/null || echo " unknown" )
72+ fi
73+ echo " Local version: ${local_version} (${current_branch} )"
74+ echo " Remote version: ${remote_version} (${current_branch} )"
6875 echo " Last commit: ${last_commit_date} "
6976 echo " Last update: $( get_last_update) "
7077}
You can’t perform that action at this time.
0 commit comments