From d2e4c69aee380b5eb9cde3438de1bf27f9ff25cb Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 18 Dec 2020 15:43:49 +0100 Subject: [PATCH] add go-mod-tidy targets to Makefiles --- Makefile | 20 ++++++++++++++++++++ accounts/Makefile | 4 ++++ glauth/Makefile | 4 ++++ konnectd/Makefile | 4 ++++ ocis-pkg/Makefile | 4 ++++ ocis/Makefile | 4 ++++ ocs/Makefile | 4 ++++ onlyoffice/Makefile | 4 ++++ proxy/Makefile | 4 ++++ settings/Makefile | 4 ++++ storage/Makefile | 4 ++++ store/Makefile | 4 ++++ thumbnails/Makefile | 4 ++++ web/Makefile | 4 ++++ webdav/Makefile | 4 ++++ 15 files changed, 76 insertions(+) diff --git a/Makefile b/Makefile index 2d52ecb9fb..9bef74b87c 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,20 @@ WHITE := $(shell tput -Txterm setaf 7) RESET := $(shell tput -Txterm sgr0) +OCIS_MODULES = \ + accounts \ + glauth \ + konnectd \ + ocis \ + ocs \ + ocis-pkg \ + proxy \ + settings \ + storage \ + store \ + thumbnails \ + web \ + webdav .PHONY: help help: @@ -63,3 +77,9 @@ vendor-bin/behat/composer.lock: vendor-bin/behat/composer.json composer.lock: composer.json @echo composer.lock is not up to date. + +.PHONY: go-mod-tidy +go-mod-tidy: + @for mod in $(OCIS_MODULES); do \ + $(MAKE) --no-print-directory -C $$mod go-mod-tidy; \ + done diff --git a/accounts/Makefile b/accounts/Makefile index d115aed0d4..7199e3d9b9 100644 --- a/accounts/Makefile +++ b/accounts/Makefile @@ -64,6 +64,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) $(HUGO) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/glauth/Makefile b/glauth/Makefile index cb7734c300..3920939c19 100644 --- a/glauth/Makefile +++ b/glauth/Makefile @@ -59,6 +59,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/konnectd/Makefile b/konnectd/Makefile index eb33b3ae93..a750b30eb9 100644 --- a/konnectd/Makefile +++ b/konnectd/Makefile @@ -66,6 +66,10 @@ clean: rm -rf node_modules rm -rf assets/identifier +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/ocis-pkg/Makefile b/ocis-pkg/Makefile index 946ac80546..c399cefbb5 100644 --- a/ocis-pkg/Makefile +++ b/ocis-pkg/Makefile @@ -37,6 +37,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/ocis/Makefile b/ocis/Makefile index a48deeff03..77129659f4 100644 --- a/ocis/Makefile +++ b/ocis/Makefile @@ -66,6 +66,10 @@ clean: clean-config go clean -i ./... rm -rf $(BIN) $(DIST) $(HUGO) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: clean-config clean-config: rm -rf $(CONFIG) diff --git a/ocs/Makefile b/ocs/Makefile index e08e013c11..a4a8cc6615 100644 --- a/ocs/Makefile +++ b/ocs/Makefile @@ -60,6 +60,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/onlyoffice/Makefile b/onlyoffice/Makefile index 72f8873722..f73eef2cce 100644 --- a/onlyoffice/Makefile +++ b/onlyoffice/Makefile @@ -61,6 +61,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/proxy/Makefile b/proxy/Makefile index 0720b12360..59be234642 100644 --- a/proxy/Makefile +++ b/proxy/Makefile @@ -60,6 +60,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/settings/Makefile b/settings/Makefile index b3cc9e57c1..63390b3a25 100644 --- a/settings/Makefile +++ b/settings/Makefile @@ -63,6 +63,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/storage/Makefile b/storage/Makefile index c1048bbfab..c879e49296 100644 --- a/storage/Makefile +++ b/storage/Makefile @@ -61,6 +61,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/store/Makefile b/store/Makefile index 773edd8b0f..dedc4ab67b 100644 --- a/store/Makefile +++ b/store/Makefile @@ -60,6 +60,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/thumbnails/Makefile b/thumbnails/Makefile index 3489c21690..16a5e88e64 100644 --- a/thumbnails/Makefile +++ b/thumbnails/Makefile @@ -61,6 +61,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/web/Makefile b/web/Makefile index d6401a0493..41b6d054a5 100644 --- a/web/Makefile +++ b/web/Makefile @@ -60,6 +60,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) assets +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES) diff --git a/webdav/Makefile b/webdav/Makefile index 3a44111a47..b45e33afa9 100644 --- a/webdav/Makefile +++ b/webdav/Makefile @@ -59,6 +59,10 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) +.PHONY: go-mod-tidy +go-mod-tidy: + @go mod tidy + .PHONY: fmt fmt: gofmt -s -w $(SOURCES)