Skip to content

Commit b30d05e

Browse files
authored
feat(devenv): Skip devenv sync call when we have FE changes and env var is set (#87112)
Follow up to #84885 `devenv sync` is a lot quicker now for BE folks since it skips the yarn updates. However, it takes a while to run in general, and it gets triggered whenever `yarn.lock` is updated. Modiyfing `post-merge` to also skip `devenv_sync` if `$SENTRY_DEVENV_SKIP_FRONTEND=1` and we only have changes in `yarn.lock`.
1 parent 2405af4 commit b30d05e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

config/hooks/post-merge

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ trap "rm -f $files_changed_upstream" EXIT
1111

1212
git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD >"$files_changed_upstream"
1313

14-
if grep --quiet 'requirements-dev-frozen.txt' "$files_changed_upstream" || grep --quiet 'yarn.lock' "$files_changed_upstream" || grep --quiet 'migrations' "$files_changed_upstream"; then
14+
grep_pattern="requirements-dev-frozen.txt|migrations"
15+
if [[ "$SENTRY_DEVENV_SKIP_FRONTEND" != "1" ]]; then
16+
grep_pattern+="|yarn.lock"
17+
fi
18+
19+
if grep -E --quiet "$grep_pattern" "$files_changed_upstream"; then
1520
cat <<EOF
1621
1722
[${red}${bold}!!!${reset}] ${red} It looks like some dependencies have changed. Run devenv sync to resync your environment.${reset}

0 commit comments

Comments
 (0)