Files
Koenraad VerheydenandGitHub 5eab9ad4da Update prometheus/prometheus dependency and remove unnecessary replace directives (#1322)
* Update prometheus/prometheus dependency and remove unnecessary replace directives

I need a recent version of github.com/prometheus/prometheus for an upcoming metrics-generator PR.

I replaced the version with v1.8.2-0.20220228151929-e25a59925555, this corresponds with [the latest release candidate](https://github.com/prometheus/prometheus/releases/tag/v2.34.0-rc.0).

I noticed some of our replace directives are fairly old, so I've been deleting them until the build broke, not sure if there is a better way to do this 🤷

* Update go.mod in tempo-serverless as well

* Lint: replace grpc.WithInsecure
2022-03-04 14:52:02 +01:00

36 lines
858 B
Makefile

PACKAGE_DIRS := $(shell find . -mindepth 2 -type f -name 'go.mod' -exec dirname {} \; | sort)
test: testdeps
go test ./...
go test ./... -short -race
go test ./... -run=NONE -bench=. -benchmem
env GOOS=linux GOARCH=386 go test ./...
go vet
testdeps: testdata/redis/src/redis-server
bench: testdeps
go test ./... -test.run=NONE -test.bench=. -test.benchmem
.PHONY: all test testdeps bench
testdata/redis:
mkdir -p $@
wget -qO- https://download.redis.io/releases/redis-6.2.5.tar.gz | tar xvz --strip-components=1 -C $@
testdata/redis/src/redis-server: testdata/redis
cd $< && make all
fmt:
gofmt -w -s ./
goimports -w -local github.com/go-redis/redis ./
go_mod_tidy:
go get -u && go mod tidy
set -e; for dir in $(PACKAGE_DIRS); do \
echo "go mod tidy in $${dir}"; \
(cd "$${dir}" && \
go get -u && \
go mod tidy); \
done