VERSION=$(echo "$VERSION" | xargs) # trim whitespace
MSG=":robot_face: *[Automated Reminder]* Next RC for dynamo *${VERSION}* will be started at 3 pm PST today. Ensure the CPs are mergeable and updated in release canvas for QA verification. cc: <!subteam^${SLACK_GROUP_ID}>"
if curl -sSf -X POST -H "Content-Type: application/json" \
-d "$(jq -n --arg t "$MSG" '{text:$t}')" "$SLACK_WEBHOOK_URL" 2>/dev/null; then
echo "Sent announcement for ${VERSION}"
else
echo "Failed to send announcement for ${VERSION}" >&2; exit 1