diff --git a/daily.sh b/daily.sh index 033f6a38b8..de298c7b9c 100755 --- a/daily.sh +++ b/daily.sh @@ -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'))