Skip to content

Commit dc28e6a

Browse files
authored
Merge pull request #20 from jetify-com/landau/add-DEVBOX_GO_MONOREPO_EXCLUDE
[go-monorepo] add DEVBOX_GO_MONOREPO_EXCLUDE
2 parents 4aab823 + 7e13cce commit dc28e6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

go-monorepo/for_each_gomod.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
# every module.
44
pwd="$(pwd)"
55
for dir in $(go list -m -f '{{`{{.Dir}}`}}'); do
6+
# Skip directories that match the exclude pattern if set
7+
if [ -n "${DEVBOX_GO_MONOREPO_EXCLUDE}" ] && [[ "$dir" =~ ${DEVBOX_GO_MONOREPO_EXCLUDE} ]]; then
8+
echo "Skipping excluded directory: $dir"
9+
continue
10+
fi
611
echo "$dir: $*" && cd "$dir" && "$@" || exit $?
712
done
813
cd "$pwd" || return

0 commit comments

Comments
 (0)