Added the logging of which version upgrading from -> to

This commit is contained in:
laf
2016-07-09 00:11:45 +01:00
parent cbe6ca4f8e
commit b8d9ab3292

View File

@@ -38,10 +38,20 @@ if [ -z "$arg" ]; then
exit
elif [ "$up" -eq 1 ]; then
# Update to Master-Branch
old_ver=$(git show --pretty="%H" -s HEAD)
status_run 'Updating to latest codebase' 'git pull --quiet'
new_ver=$(git show --pretty="%H" -s HEAD)
if [ "$old_ver" != "$new_ver" ]; then
status_run "Updated from $old_ver to $new_ver" ''
fi
elif [ "$up" -eq 3 ]; then
# Update to last Tag
old_ver=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))
status_run 'Updating to latest release' 'git fetch --tags && git checkout $(git describe --tags $(git rev-list --tags --max-count=1))'
new_ver=$(git describe --exact-match --tags $(git log -n1 --pretty='%h'))
if [ "$old_ver" -ne "$new_ver" ]; then
status_run "Updated from $old_ver to $new_ver" ''
fi
fi
cnf=$(echo $(grep '\[.distributed_poller.\]' config.php | egrep -v -e '^//' -e '^#' | cut -d = -f 2 | sed 's/;//g'))