Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 631f8fa

Browse files
committed
refactor(makefile): extract logic & rename to before_action
1 parent 98c0379 commit 631f8fa

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

Makefile

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include Makefile.include.mk
22

3-
json_cli:
4-
chmod 755 $(JSON_CLI)
3+
before_action:
4+
@chmod 755 $(JSON_CLI)
55

66
help:
77
$(call serve.help)
@@ -22,20 +22,22 @@ dep:
2222
npm install # for commitizen
2323

2424
# shortcut for serve.local
25-
dev: json_cli
26-
$(JSON_CLI) -s '.[0] * .[1]' config/config.json config/config.local.json > /tmp/config.json
27-
cp /tmp/config.json ./config/config.json
25+
dev: before_action
26+
@$(JSON_CLI) -s '.[0] * .[1]' config/config.json config/config.local.json > /tmp/config.json
27+
@cp /tmp/config.json ./config/config.json
2828
npm run local
2929

3030
build:
3131
npm build
3232

33-
build.dev:
34-
$(JSON_CLI) -s '.[0] * .[1]' config/config.json config/config.dev.json > /config.json
33+
build.dev: before_action
34+
@$(JSON_CLI) -s '.[0] * .[1]' config/config.json config/config.dev.json > /tmp/config.json
35+
@cp /tmp/config.json ./config/config.json
3536
npm run build.dev
3637

37-
build.prod:
38-
$(JSON_CLI) -s '.[0] * .[1]' config/config.json config/config.prod.json > /config.json
38+
build.prod: before_action
39+
@$(JSON_CLI) -s '.[0] * .[1]' config/config.json config/config.prod.json > /tmp/config.json
40+
@cp /tmp/config.json ./config/config.json
3941
npm run build.prod
4042

4143
serve.help:

0 commit comments

Comments
 (0)