Skip to content

Commit

Permalink
chore: improve dependency installation (#3395)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgo authored Dec 27, 2022
1 parent 7ebe8cd commit 7599c82
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export GO111MODULE := on
export PATH := .bin:${PATH}
export PWD := $(shell pwd)

GOLANGCI_LINT_VERSION = 1.46.2

GO_DEPENDENCIES = github.com/ory/go-acc \
github.com/golang/mock/mockgen \
github.com/go-swagger/go-swagger/cmd/swagger \
Expand All @@ -15,8 +17,9 @@ define make-go-dependency
GOBIN=$(PWD)/.bin/ go install $1
endef

.bin/golangci-lint: Makefile
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b .bin v1.46.2
.bin/golangci-lint-$(GOLANGCI_LINT_VERSION):
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b .bin v$(GOLANGCI_LINT_VERSION)
mv .bin/golangci-lint .bin/golangci-lint-$(GOLANGCI_LINT_VERSION)

$(foreach dep, $(GO_DEPENDENCIES), $(eval $(call make-go-dependency, $(dep))))

Expand Down Expand Up @@ -45,8 +48,8 @@ docs/cli: .bin/clidoc
touch .bin/ory

.PHONY: lint
lint: .bin/golangci-lint
golangci-lint run -v ./...
lint: .bin/golangci-lint-$(GOLANGCI_LINT_VERSION)
.bin/golangci-lint-$(GOLANGCI_LINT_VERSION) run -v ./...

# Runs full test suite including tests where databases are enabled
.PHONY: test
Expand Down

0 comments on commit 7599c82

Please sign in to comment.