Skip to content

Commit ef6684e

Browse files
committed
feat(makefile): add arguments
1 parent 9df8ad8 commit ef6684e

File tree

4 files changed

+9
-36
lines changed

4 files changed

+9
-36
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
steps:
1111
- name: Checkout
1212
uses: actions/checkout@v2
13+
with:
14+
submodules: recursive
1315
- name: Cache npm packages
1416
id: npm-cache
1517
uses: actions/cache@v2

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "make"]
2+
path = make
3+
url = [email protected]:koromerzhin/make.git

Makefile

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,15 @@
1-
.DEFAULT_GOAL := help
1+
include make/general/Makefile
22

3-
SUPPORTED_COMMANDS := contributors git linter
3+
SUPPORTED_COMMANDS := linter
44
SUPPORTS_MAKE_ARGS := $(findstring $(firstword $(MAKECMDGOALS)), $(SUPPORTED_COMMANDS))
55
ifneq "$(SUPPORTS_MAKE_ARGS)" ""
66
COMMAND_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
77
$(eval $(COMMAND_ARGS):;@:)
88
endif
99

10-
help:
11-
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
12-
13-
node_modules:
14-
@npm install
15-
1610
install: node_modules ## Installation application
1711

18-
contributors: node_modules ## Contributors
19-
ifeq ($(COMMAND_ARGS),add)
20-
@npm run contributors add
21-
else ifeq ($(COMMAND_ARGS),check)
22-
@npm run contributors check
23-
else ifeq ($(COMMAND_ARGS),generate)
24-
@npm run contributors generate
25-
else
26-
@npm run contributors
27-
endif
28-
29-
git: node_modules ## Scripts GIT
30-
ifeq ($(COMMAND_ARGS),status)
31-
@git status
32-
else ifeq ($(COMMAND_ARGS),check)
33-
@make contributors check -i
34-
@make linter all -i
35-
@make git status -i
36-
else
37-
@echo "ARGUMENT missing"
38-
@echo "---"
39-
@echo "make git ARGUMENT"
40-
@echo "---"
41-
@echo "check: CHECK before"
42-
@echo "status: status"
43-
endif
44-
45-
linter: node_modules ## Scripts Linter
12+
linter: node_modules ### Scripts Linter
4613
ifeq ($(COMMAND_ARGS),all)
4714
@make linter readme -i
4815
else ifeq ($(COMMAND_ARGS),readme)

make

Submodule make added at f52a020

0 commit comments

Comments
 (0)