Skip to content

Instantly share code, notes, and snippets.

@quis
Last active February 25, 2020 13:41
Show Gist options
  • Save quis/22ecc5cf465893a9e1deeeb10772b485 to your computer and use it in GitHub Desktop.
Save quis/22ecc5cf465893a9e1deeeb10772b485 to your computer and use it in GitHub Desktop.
preview=$(curl -s https://www.notify.works/_status | jq '.travis_commit')
staging=$(curl -s https://www.staging-notify.works/_status | jq '.travis_commit')
production=$(curl -s https://www.notifications.service.gov.uk/_status | jq '.travis_commit')
echo "Preview: ${preview}"
echo "Staging: ${staging}"
echo "Production: ${production}"
if [ $preview = $production ]
then
echo "🚢 Production is up to date with preview"
exit 0
else
echo "⚠️ Production is behind preview" >&2
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment