#!/usr/bin/env bash red="$(tput setaf 1)" yellow="$(tput setaf 3)" bold="$(tput bold)" reset="$(tput sgr0)" files_changed_upstream="$(mktemp)" # shellcheck disable=SC2064 trap "rm -f $files_changed_upstream" EXIT git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD >"$files_changed_upstream" if grep --quiet 'requirements-dev-frozen.txt' "$files_changed_upstream" || grep --quiet 'yarn.lock' "$files_changed_upstream" || grep --quiet 'migrations' "$files_changed_upstream"; then cat </dev/null 2>&1; then echo "devenv not found! install: https://github.com/getsentry/devenv#install" exit 1 fi "$DEVENV" sync else echo "${yellow}If you want devenv sync to be executed automatically after pulling code, you can export the SENTRY_POST_MERGE_AUTO_UPDATE variable.${reset}" fi fi