1
0
mirror of https://github.com/uptrace/go-clickhouse.git synced 2025-06-08 23:26:11 +02:00
go-clickhouse/Makefile

34 lines
783 B
Makefile
Raw Permalink Normal View History

2022-01-23 09:36:24 +02:00
ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
test:
set -e; for dir in $(ALL_GO_MOD_DIRS); do \
echo "go test in $${dir}"; \
(cd "$${dir}" && \
go test && \
env GOOS=linux GOARCH=386 go test && \
go vet); \
done
2022-08-30 09:22:39 +03:00
.PHONY: go_mod_tidy
2022-01-23 09:36:24 +02:00
go_mod_tidy:
set -e; for dir in $(ALL_GO_MOD_DIRS); do \
echo "go mod tidy in $${dir}"; \
2022-08-30 09:22:39 +03:00
(cd "$${dir}" && go mod tidy -go=1.18); \
done
.PHONY: deps
deps:
set -e; for dir in $(ALL_GO_MOD_DIRS); do \
echo "go get -u ./... && go mod tidy in $${dir}"; \
2022-01-23 09:36:24 +02:00
(cd "$${dir}" && \
go get -u ./... && \
2022-08-30 09:22:39 +03:00
go mod tidy -go=1.18); \
2022-01-23 09:36:24 +02:00
done
fmt:
gofmt -w -s ./
goimports -w -local github.com/uptrace/go-clickhouse ./
codegen:
go run ./ch/internal/codegen/ -dir=ch/chschema