flamingo.me/flamingo-commerce/v3@v3.11.0/Makefile (about) 1 CONTEXT?=dev 2 REPLACE?=-replace flamingo.me/flamingo/v3=../flamingo -replace flamingo.me/form=../form 3 DROPREPLACE?=-dropreplace flamingo.me/flamingo/v3 -dropreplace flamingo.me/form 4 5 .PHONY: local unlocal test lint 6 7 local: 8 git config filter.gomod-flamingo-commerce.smudge 'go mod edit -fmt -print $(REPLACE) /dev/stdin' 9 git config filter.gomod-flamingo-commerce.clean 'go mod edit -fmt -print $(DROPREPLACE) /dev/stdin' 10 git config filter.gomod-flamingo-commerce.required true 11 go mod edit -fmt $(REPLACE) 12 13 unlocal: 14 git config filter.gomod-flamingo-commerce.smudge '' 15 git config filter.gomod-flamingo-commerce.clean '' 16 git config filter.gomod-flamingo-commerce.required false 17 go mod edit -fmt $(DROPREPLACE) 18 19 test: 20 go test -race -v ./... 21 gofmt -l -e -d . 22 golint ./... 23 misspell -error . 24 ineffassign . 25 26 integrationtest: 27 go test -test.count=10 -race -v ./test/integrationtest/... -tags=integration 28 29 generate-integrationtest-graphql: 30 rm -f test/integrationtest/projecttest/graphql/generated.go 31 rm -f test/integrationtest/projecttest/graphql/resolver.go 32 go generate ./... 33 export RUN="0" && cd test/integrationtest/projecttest && go run -tags graphql main.go 34 35 fix: 36 gofmt -l -w . 37 38 run-integrationtest-demo-project: 39 cd test/integrationtest/projecttest/tests && RUN=1 INTEGRATION_TEST_PORT=10000 go run ../main.go 40 41 lint: 42 $(eval FIRST_COMMIT = $(shell git rev-list --topo-order origin/master..HEAD | tail -1)) 43 @echo FIRST_COMMIT=$(FIRST_COMMIT) 44 $(eval FIRST_COMMIT = $(or $(FIRST_COMMIT), "origin/master")) 45 @echo "FIRST_COMMIT is now $(FIRST_COMMIT)" 46 $(eval REV=$(shell git rev-parse $(FIRST_COMMIT)^1)) 47 golangci-lint run --new-from-rev=$(REV)