[server] improve minor-upgrade.sh