#!/usr/bin/env bash # Push main to staging HF Space and patch its title/color. # # README.md in git stays prod-canonical (title: NowAI-Bench, colorFrom: indigo). # After each push, huggingface_hub.metadata_update() commits a README patch # directly on the staging Space. We force-push on the next run to overwrite it, # so that commit never needs to be merged locally. set -euo pipefail STAGING_REMOTE="origin" STAGING_SPACE="ServiceNow-AI/NowAI-Bench-Staging" STAGING_TITLE="NowAI-Bench Staging" STAGING_COLOR="red" echo "→ Force-pushing to staging (overwrites prior metadata patch)..." git push --force "$STAGING_REMOTE" main echo "→ Patching staging Space metadata..." python3 - <