This repository has been archived by the owner on Jul 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
72 lines (58 loc) · 1.73 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
MAKEVAR_VERSION?=0.0.0-dev-$(shell git log -n 1 --pretty=format:%h)
MAKEVAR_REGISTRY?=ghcr.io/katulu-io/fl-suite
include .devcontainer/targets.mk
MFILES = $(shell find . -maxdepth 5 -type f -name Makefile ! -path "*/node_modules/*" ! -path "*/vendor/*" ! -path "*/go/*" ! -path "*/demos/*")
SUBDIRS = $(filter-out ./,$(dir $(MFILES)))
node_modules: package.json
@yarn install
dependencies: node_modules
.PHONY: dependencies
env: dependencies
@rm -f .env
@yarn workspace @katulu/release env > .env
.PHONY: env
commitlint:
yarn commitlint --from ${MAKEVAR_COMMITS_FROM} --to ${MAKEVAR_COMMITS_TO}
.PHONY: commitlint
dockerlint:
@find . -maxdepth 5 -type f -name Dockerfile ! -path "*/vendor/*" | xargs -I {} hadolint {}
.PHONY: dockerlint
LINTTARGETS = $(SUBDIRS:%=lint--%)
lint: dependencies dockerlint $(LINTTARGETS)
$(LINTTARGETS):
@$(MAKE) -C $(@:lint--%=%) lint
.PHONY: $(LINTTARGETS)
.PHONY: lint
TESTTARGETS = $(SUBDIRS:%=test--%)
test: dependencies $(TESTTARGETS)
$(TESTTARGETS):
@$(MAKE) -C $(@:test--%=%) test
.PHONY: $(TESTTARGETS)
.PHONY: test
BUILDTARGETS = $(SUBDIRS:%=build--%)
build: dependencies $(BUILDTARGETS)
$(BUILDTARGETS):
@$(MAKE) -C $(@:build--%=%) build
.PHONY: $(BUILDTARGETS)
.PHONY: build
DISTTARGETS = $(SUBDIRS:%=dist--%)
dist: dependencies $(DISTTARGETS)
$(DISTTARGETS):
@$(MAKE) -C $(@:dist--%=%) dist
.PHONY: $(DISTTARGETS)
.PHONY: dist
PUSHTARGETS = $(SUBDIRS:%=push--%)
push: dependencies $(PUSHTARGETS)
$(PUSHTARGETS):
@$(MAKE) -C $(@:push--%=%) push
.PHONY: $(PUSHTARGETS)
.PHONY: push
release: dependencies
@yarn workspace @katulu/release publish
.PHONY: release
CLEANTARGETS = $(SUBDIRS:%=clean--%)
clean: $(CLEANTARGETS)
$(CLEANTARGETS):
@$(MAKE) -C $(@:clean--%=%) clean
.PHONY: $(CLEANTARGETS)
.PHONY: clean