diff options
| author | Rutger Broekhoff | 2023-12-29 21:31:53 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2023-12-29 21:31:53 +0100 |
| commit | 404aeae4545d2426c089a5f8d5e82dae56f5212b (patch) | |
| tree | 2d84e00af272b39fc04f3795ae06bc48970e57b5 /vendor/github.com/minio/minio-go/v7/Makefile | |
| parent | 209d8b0187ed025dec9ac149ebcced3462877bff (diff) | |
| download | gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.tar.gz gitolfs3-404aeae4545d2426c089a5f8d5e82dae56f5212b.zip | |
Make Nix builds work
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/Makefile')
| -rw-r--r-- | vendor/github.com/minio/minio-go/v7/Makefile | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/Makefile b/vendor/github.com/minio/minio-go/v7/Makefile new file mode 100644 index 0000000..68444aa --- /dev/null +++ b/vendor/github.com/minio/minio-go/v7/Makefile | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | GOPATH := $(shell go env GOPATH) | ||
| 2 | TMPDIR := $(shell mktemp -d) | ||
| 3 | |||
| 4 | all: checks | ||
| 5 | |||
| 6 | .PHONY: examples docs | ||
| 7 | |||
| 8 | checks: lint vet test examples functional-test | ||
| 9 | |||
| 10 | lint: | ||
| 11 | @mkdir -p ${GOPATH}/bin | ||
| 12 | @echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin | ||
| 13 | @echo "Running $@ check" | ||
| 14 | @GO111MODULE=on ${GOPATH}/bin/golangci-lint cache clean | ||
| 15 | @GO111MODULE=on ${GOPATH}/bin/golangci-lint run --timeout=5m --config ./.golangci.yml | ||
| 16 | |||
| 17 | vet: | ||
| 18 | @GO111MODULE=on go vet ./... | ||
| 19 | @echo "Installing staticcheck" && go install honnef.co/go/tools/cmd/staticcheck@latest | ||
| 20 | ${GOPATH}/bin/staticcheck -tests=false -checks="all,-ST1000,-ST1003,-ST1016,-ST1020,-ST1021,-ST1022,-ST1023,-ST1005" | ||
| 21 | |||
| 22 | test: | ||
| 23 | @GO111MODULE=on SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1 MINT_MODE=full go test -race -v ./... | ||
| 24 | |||
| 25 | examples: | ||
| 26 | @echo "Building s3 examples" | ||
| 27 | @cd ./examples/s3 && $(foreach v,$(wildcard examples/s3/*.go),go build -mod=mod -o ${TMPDIR}/$(basename $(v)) $(notdir $(v)) || exit 1;) | ||
| 28 | @echo "Building minio examples" | ||
| 29 | @cd ./examples/minio && $(foreach v,$(wildcard examples/minio/*.go),go build -mod=mod -o ${TMPDIR}/$(basename $(v)) $(notdir $(v)) || exit 1;) | ||
| 30 | |||
| 31 | functional-test: | ||
| 32 | @GO111MODULE=on go build -race functional_tests.go | ||
| 33 | @SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1 MINT_MODE=full ./functional_tests | ||
| 34 | |||
| 35 | clean: | ||
| 36 | @echo "Cleaning up all the generated files" | ||
| 37 | @find . -name '*.test' | xargs rm -fv | ||
| 38 | @find . -name '*~' | xargs rm -fv | ||