-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathMakefile
48 lines (33 loc) · 1.28 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
.PHONY: version doctor
PANA_SCRIPT=../../tool/verify_pub_score.sh 100
PACKAGES_PATH= packages/mad_pay_platform_interface packages/mad_pay_ios packages/mad_pay_android packages/mad_pay
PACKAGES_WITH_EXAMPLE_PATH= $(PACKAGES_PATH) example
FVM = fvm
FVM_FLUTTER = $(FVM) flutter
FVM_DART = $(FVM) dart
init:
$(FVM) use 3.3.5 --force; $(FVM_DART) pub global activate protoc_plugin; $(FVM_DART) pub global activate pana;
version:
$(FVM_FLUTTER) --version; $(FVM_DART) --version;
doctor:
$(FVM_FLUTTER) doctor;
ifeq (bump, $(firstword $(MAKECMDGOALS)))
runargs := $(wordlist 2, $(words $(MAKECMDGOALS)), $(MAKECMDGOALS))
$(eval $(runargs):;@true)
endif
bump:
./tool/bump-version.sh $(filter-out $@,$(MAKECMDGOALS))
proto:
./tool/gen.sh
pub_get:
$(foreach v, $(PACKAGES_WITH_EXAMPLE_PATH), cd $(v); $(FVM_FLUTTER) packages get; cd ../..;)
clean:
$(foreach v, $(PACKAGES_WITH_EXAMPLE_PATH), cd $(v); $(FVM_FLUTTER) clean; cd ../..;)
format:
$(foreach v, $(PACKAGES_WITH_EXAMPLE_PATH), cd $(v); $(FVM_FLUTTER) format .; cd ../..;)
analyze:
$(foreach v, $(PACKAGES_PATH), cd $(v); $(FVM_FLUTTER) analyze . --fatal-infos; cd ../..;)
pana:
$(foreach v, $(PACKAGES_PATH), cd $(v); $(PANA_SCRIPT); cd ../..;)
publish:
$(foreach v, $(PACKAGES_PATH), cd $(v); yes Y | dart pub publish; cd ../..;)