refactor makefiles

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2022-04-13 12:28:49 +02:00
parent 725d55b494
commit 418e32f3d7
3 changed files with 25 additions and 25 deletions

View File

@@ -1,24 +1,24 @@
SHA1_LOCK_FILE := $(abspath $(CURDIR)/../protogen/buf.sha1.lock)
SHA1_LOCK_FILE := $(abspath $(CURDIR)/../../protogen/buf.sha1.lock)
# bingo creates symlinks from the -l option in GOBIN, from where
# we can easily use it with buf. To have the symlinks inside this
# repo and on a known location, we set GOBIN to .bingo in the root
# of the repository (therefore we need to cd ..)
# of the repository (therefore we need to cd ../..)
.PHONY: protoc-deps
protoc-deps: $(BINGO)
@cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go
@cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v4
@cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb
@cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
@cd .. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v4
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
@cd ../.. && GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
.PHONY: buf-generate
buf-generate: $(BUF) protoc-deps $(SHA1_LOCK_FILE)
@find $(abspath $(CURDIR)/../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > buf.sha1.lock.tmp
@find $(abspath $(CURDIR)/../../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > buf.sha1.lock.tmp
@cmp $(SHA1_LOCK_FILE) buf.sha1.lock.tmp --quiet || $(MAKE) -B $(SHA1_LOCK_FILE)
@rm -f buf.sha1.lock.tmp
$(SHA1_LOCK_FILE):
@echo "generating protobuf content"
cd ../protogen/proto && $(BUF) generate
find $(abspath $(CURDIR)/../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > $(SHA1_LOCK_FILE)
find $(abspath $(CURDIR)/../../protogen/proto/) -type f -print0 | sort -z | xargs -0 sha1sum > $(SHA1_LOCK_FILE)

View File

@@ -16,22 +16,22 @@ L10N_MODULES := $(shell find . -path '*.tx*' -name 'config' | sed 's|/[^/]*$$||'
# if you add a module here please also add it to the .drone.star file
OCIS_MODULES = \
accounts \
audit \
glauth \
graph \
graph-explorer \
idp \
extensions/accounts \
extensions/audit \
extensions/glauth \
extensions/graph \
extensions/graph-explorer \
extensions/idp \
extensions/ocs \
extensions/proxy \
extensions/settings \
extensions/storage \
extensions/store \
extensions/thumbnails \
extensions/web \
extensions/webdav\
ocis \
ocis-pkg \
ocs \
proxy \
settings \
storage \
store \
thumbnails \
web \
webdav
ocis-pkg
# bin file definitions
PHP_CS_FIXER=php -d zend.enable_gc=0 vendor-bin/owncloud-codestyle/vendor/bin/php-cs-fixer

View File

@@ -1,4 +1,4 @@
// Code generated by mockery v2.9.4. DO NOT EDIT.
// Code generated by mockery v2.10.4. DO NOT EDIT.
package mocks