Skip to content

Commit

Permalink
Change PACKAGES to GO_PACKAGES for FreeBSD compatibility (go-gitea#10747
Browse files Browse the repository at this point in the history
)

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
  • Loading branch information
guillep2k and guillep2k committed Mar 17, 2020
1 parent c7f3d16 commit 10e8da1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ endif

LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)"

PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell GO111MODULE=on $(GO) list -mod=vendor ./... | grep -v /vendor/)))
GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell GO111MODULE=on $(GO) list -mod=vendor ./... | grep -v /vendor/)))

WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f)
WEBPACK_CONFIGS := webpack.config.js .eslintrc .stylelintrc
Expand Down Expand Up @@ -185,7 +185,7 @@ fmt:

.PHONY: vet
vet:
$(GO) vet $(PACKAGES)
$(GO) vet $(GO_PACKAGES)

.PHONY: $(TAGS_EVIDENCE)
$(TAGS_EVIDENCE):
Expand Down Expand Up @@ -222,7 +222,7 @@ errcheck:
@hash errcheck > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/kisielk/errcheck; \
fi
errcheck $(PACKAGES)
errcheck $(GO_PACKAGES)

.PHONY: revive
revive:
Expand Down Expand Up @@ -257,7 +257,7 @@ fmt-check:

.PHONY: test
test:
GO111MODULE=on $(GO) test $(GOTESTFLAGS) -mod=vendor -tags='sqlite sqlite_unlock_notify' $(PACKAGES)
GO111MODULE=on $(GO) test $(GOTESTFLAGS) -mod=vendor -tags='sqlite sqlite_unlock_notify' $(GO_PACKAGES)

.PHONY: test-check
test-check:
Expand All @@ -273,7 +273,7 @@ test-check:

.PHONY: test\#%
test\#%:
GO111MODULE=on $(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' -run $* $(PACKAGES)
GO111MODULE=on $(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' -run $* $(GO_PACKAGES)

.PHONY: coverage
coverage:
Expand All @@ -284,7 +284,7 @@ coverage:

.PHONY: unit-test-coverage
unit-test-coverage:
GO111MODULE=on $(GO) test $(GOTESTFLAGS) -mod=vendor -tags='sqlite sqlite_unlock_notify' -cover -coverprofile coverage.out $(PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1
GO111MODULE=on $(GO) test $(GOTESTFLAGS) -mod=vendor -tags='sqlite sqlite_unlock_notify' -cover -coverprofile coverage.out $(GO_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1

.PHONY: vendor
vendor:
Expand Down Expand Up @@ -424,7 +424,7 @@ integrations.sqlite.test: git-check $(GO_SOURCES)
GO111MODULE=on $(GO) test $(GOTESTFLAGS) -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags 'sqlite sqlite_unlock_notify'

integrations.cover.test: git-check $(GO_SOURCES)
GO111MODULE=on $(GO) test $(GOTESTFLAGS) -mod=vendor -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(PACKAGES) | tr ' ' ',') -o integrations.cover.test
GO111MODULE=on $(GO) test $(GOTESTFLAGS) -mod=vendor -c code.gitea.io/gitea/integrations -coverpkg $(shell echo $(GO_PACKAGES) | tr ' ' ',') -o integrations.cover.test

.PHONY: migrations.mysql.test
migrations.mysql.test: $(GO_SOURCES)
Expand Down Expand Up @@ -464,7 +464,7 @@ backend: go-check generate $(EXECUTABLE)

.PHONY: generate
generate: $(TAGS_PREREQ)
GO111MODULE=on $(GO) generate -mod=vendor -tags '$(TAGS)' $(PACKAGES)
GO111MODULE=on $(GO) generate -mod=vendor -tags '$(TAGS)' $(GO_PACKAGES)

$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
Expand Down

0 comments on commit 10e8da1

Please sign in to comment.