prevent multiple yarn builds of accounts and settings when running make ci-node-generate int the repo root

This commit is contained in:
Willy Kloucek
2021-11-16 10:01:12 +01:00
parent c397a981a3
commit 74e7344221
18 changed files with 49 additions and 8 deletions

8
.make/recursion.mk Normal file
View File

@@ -0,0 +1,8 @@
ifeq ($(MAKE_DEPTH),)
MAKE_DEPTH := 0
else
$(eval MAKE_DEPTH := $(shell echo "$$(( $(MAKE_DEPTH) + 1 ))" ) )
endif
export

View File

@@ -43,6 +43,8 @@ ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings`
include .bingo/Variables.mk
endif
include .make/recursion.mk
.PHONY: help
help:
@echo "Please use 'make <target>' where <target> is one of the following:"
@@ -130,9 +132,10 @@ ci-go-generate:
.PHONY: ci-node-generate
ci-node-generate:
@for mod in $(OCIS_MODULES); do \
@if [ $(MAKE_DEPTH) -le 1 ]; then \
for mod in $(OCIS_MODULES); do \
$(MAKE) --no-print-directory -C $$mod ci-node-generate; \
done
done; fi;
.PHONY: go-mod-tidy
go-mod-tidy:

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := accounts
include ../.make/recursion.mk
.PHONY: test-acceptance-webui
test-acceptance-webui:
./ui/tests/run-acceptance-test.sh $(FEATURE_PATH)

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := glauth
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := graph-explorer
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := graph
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := idp
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -150,5 +150,6 @@
"webpack-manifest-plugin": "3.1.0",
"workbox-webpack-plugin": "4.3.1",
"yarn-deduplicate": "^3.1.0"
}
},
"packageManager": "yarn@3.1.0"
}

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := ocis-pkg
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := ocis
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk
@@ -31,8 +33,7 @@ ci-go-generate: # CI runs ci-node-generate automatically before this target
@go generate ./...
.PHONY: ci-node-generate
ci-node-generate: # no need to recreate go code, just add assets
@make -C ../accounts ci-node-generate
@make -C ../graph-explorer ci-node-generate
@make -C ../settings ci-node-generate
@make -C ../web ci-node-generate
ci-node-generate: # ocis needs assets of all other modules
@if [ $(MAKE_DEPTH) -le 1 ]; then \
$(MAKE) --no-print-directory -C .. ci-node-generate \
; fi;

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := ocs
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := proxy
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := settings
include ../.make/recursion.mk
.PHONY: test-acceptance-webui
test-acceptance-webui:
./ui/tests/run-acceptance-test.sh $(FEATURE_PATH)

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := storage
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := store
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := thumbnails
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := web
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk

View File

@@ -1,6 +1,8 @@
SHELL := bash
NAME := webdav
include ../.make/recursion.mk
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk