diff options
author | silverwind <me@silverwind.io> | 2020-03-02 21:55:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 20:55:12 +0000 |
commit | ac4f952f735814b9e58189a24d952882419b173f (patch) | |
tree | a20f0dddf1435c07837edccd4e8677ea9b5364be /Makefile | |
parent | 5e1438ba92fe5b4398ebf468e4ede21c7ef60409 (diff) | |
download | gitea-ac4f952f735814b9e58189a24d952882419b173f.tar.gz gitea-ac4f952f735814b9e58189a24d952882419b173f.zip |
Fix make find command (#10580)
Continuation of https://github.com/go-gitea/gitea/pull/10577
This version also includes an additional fix for Darwin and FreeBSD
which do not accept the `-regextype` option, but only `-E` and the
argument order is specifically required like this for `-E` to work.
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -16,14 +16,18 @@ endif ifeq ($(OS), Windows_NT) EXECUTABLE ?= gitea.exe + FIND_PWD_REGEXP := find . -regextype posix-egrep else EXECUTABLE ?= gitea UNAME_S := $(shell uname -s) + FIND_PWD_REGEXP := find . -regextype posix-egrep ifeq ($(UNAME_S),Darwin) SED_INPLACE := sed -i '' + FIND_PWD_REGEXP := find -E . endif ifeq ($(UNAME_S),FreeBSD) SED_INPLACE := sed -i '' + FIND_PWD_REGEXP := find -E . endif endif @@ -63,7 +67,7 @@ LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(G 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_SOURCES ?= $(shell find . -type d \( -path ./node_modules -o -path ./docs -o -path ./public -o -path ./options -o -path ./contrib -o -path ./data \) -prune -o -type f -name '*.go' -print) +GO_SOURCES ?= $(shell $(FIND_PWD_REGEXP) -regex '\./(node_modules|docs|public|options|contrib|data)' -prune -o -name "*.go" -type f -print) GO_SOURCES_OWN := $(filter-out ./vendor/% %/bindata.go, $(GO_SOURCES)) WEBPACK_SOURCES ?= $(shell find web_src/js web_src/less -type f) |