#!/usr/bin/env bash set -euo pipefail TARGET="${1:?target version required}" cd "${AIOS_GITOPS_WORKSPACE:-/data/aios-gitops/workspace}" git fetch --all --tags || true git checkout "$TARGET" if systemctl list-unit-files | grep -q aios-gitops-model-api.service; then systemctl restart aios-gitops-model-api.service; fi echo "ROLLBACK_OK target=$TARGET"