You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@echo -n "Do you want to release? [y/N] "&&read ans &&\
101
105
if [ $${ans:-N} = y ];thenset -xe; goreleaser --rm-dist;fi
@@ -107,18 +111,19 @@ go.unittest:
107
111
ifeq ($(CI),true)
108
112
@echo "mode: atomic" > /tmp/gocoverage
109
113
@rm -f $(GOTESTJSON_FILE)
110
-
@set -e; for dir in `find $(GOMOD_DIR) -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do (set -e; (set -euf pipefail; \
114
+
@set -e; for dir in $(GOMOD_DIRS); do (set -e; (set -euf pipefail; \
111
115
cd $$dir; \
112
-
($(GO) test ./... $(GO_TEST_OPTS) -cover -coverprofile=/tmp/profile.out -covermode=atomic -race -json | tee -a $(GOTESTJSON_FILE) 3>&1 1>&2 2>&3 | tee -a $(GOBUILDLOG_FILE); \
116
+
(($(GO) test ./... $(GO_TEST_OPTS) -cover -coverprofile=/tmp/profile.out -covermode=atomic -race -json && touch $@.ok) | tee -a $(GOTESTJSON_FILE) 3>&1 1>&2 2>&3 | tee -a $(GOBUILDLOG_FILE); \
113
117
); \
118
+
rm $@.ok 2>/dev/null || exit 1; \
114
119
if [ -f /tmp/profile.out ]; then \
115
120
cat /tmp/profile.out | sed "/mode: atomic/d" >> /tmp/gocoverage; \
116
121
rm -f /tmp/profile.out; \
117
122
fi)); done
118
123
@mv /tmp/gocoverage $(GOCOVERAGE_FILE)
119
124
else
120
125
@echo "mode: atomic" > /tmp/gocoverage
121
-
@set -e; for dir in `find $(GOMOD_DIR) -type f -name "go.mod" | grep -v /vendor/ | sed 's@/[^/]*$$@@' | sort | uniq`; do (set -e; (set -xe; \
126
+
@set -e; for dir in $(GOMOD_DIRS); do (set -e; (set -xe; \
122
127
cd $$dir; \
123
128
$(GO) test ./... $(GO_TEST_OPTS) -cover -coverprofile=/tmp/profile.out -covermode=atomic -race); \
0 commit comments