#!/bin/bash # Rocket.Chat upgrade verification. # --------------------------------------------------------------------------- # Rocket.Chat runs schema migrations on boot and refuses to start when the image # is more than one major ahead of the database — the exact failure that once # kept this app on manual updates. Confirming the version it actually serves is # what makes stepping it safe. # # /api/info is unauthenticated and reports {"version":"8.7", …}. Note it reports # a shorter version than the tag (8.7 for tag 8.7.0); the shared comparison only # requires agreement on the components both sides state. # rocketchat_upgrade_verify rocketchat_upgrade_verify() { updaterVerifyHttpVersion "$1" "$2" "$3" 3000 \ "/api/info" "json:version" }