summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/uptrace/bun/Makefile')
-rw-r--r--vendor/github.com/uptrace/bun/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/vendor/github.com/uptrace/bun/Makefile b/vendor/github.com/uptrace/bun/Makefile
index 90181e9de..690958de0 100644
--- a/vendor/github.com/uptrace/bun/Makefile
+++ b/vendor/github.com/uptrace/bun/Makefile
@@ -1,4 +1,5 @@
ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
+EXAMPLE_GO_MOD_DIRS := $(shell find ./example/ -type f -name 'go.mod' -exec dirname {} \; | sort)
test:
set -e; for dir in $(ALL_GO_MOD_DIRS); do \
@@ -10,14 +11,20 @@ test:
done
go_mod_tidy:
- go get -u && go mod tidy
+ go get -u && go mod tidy -go=1.17
set -e; for dir in $(ALL_GO_MOD_DIRS); do \
echo "go mod tidy in $${dir}"; \
(cd "$${dir}" && \
go get -u ./... && \
- go mod tidy); \
+ go mod tidy -go=1.17); \
done
fmt:
gofmt -w -s ./
goimports -w -local github.com/uptrace/bun ./
+
+run-examples:
+ set -e; for dir in $(EXAMPLE_GO_MOD_DIRS); do \
+ echo "go run . in $${dir}"; \
+ (cd "$${dir}" && go run .); \
+ done