Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

543 B
Raw Blame
#!/usr/bin/env bash

set -e
set -u

source "$(dirname "$0")/../common/zulip_notify.sh"

if ! ref=$(crudini --get /etc/zulip/zulip.conf push_git_ref ref); then
    exit 0
fi

diffstat=$(git diff --stat "$ZULIP_NEW_MERGE_BASE_COMMIT" ./*/migrations/)

if [ -z "$diffstat" ]; then
    exit 0
fi

echo "zulip_notify_schema_diff: Found schema differences from merge-base!"

zulip_send "${deploy_environment} deploy on $(hostname) found differences in schema from merge-base:

\`\`\`
${diffstat}
\`\`\`

Please manually adjust the \`${ref}\` ref.
"