-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
135 lines (115 loc) · 3.59 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
SHELL=/bin/bash
.DEFAULT_GOAL := default
.PHONY: install
install:
@echo "---------------------------"
@echo "- Installing dependencies -"
@echo "---------------------------"
flutter pub get
flutter pub global activate dartdoc
pip install --user pre-commit commitizen
pre-commit install
.PHONY: update
update:
@echo "-------------------------"
@echo "- Updating dependencies -"
@echo "-------------------------"
flutter pub upgrade
.PHONY: clean
clean:
@echo "---------------------------"
@echo "- Cleaning unwanted files -"
@echo "---------------------------"
flutter clean
.PHONY: lint
lint:
@echo "-----------------------------"
@echo "- Run linters and formaters -"
@echo "-----------------------------"
pre-commit run --all-files
.PHONY: test
test:
@echo "-------------"
@echo "- Run tests -"
@echo "-------------"
flutter test
.PHONY: default
default: lint test
.PHONY: run
run:
@echo "-----------------------"
@echo "- Running the project -"
@echo "-----------------------"
flutter run
.PHONY: build-web
build-web:
@echo "-------------------------"
@echo "- Build web for release -"
@echo "-------------------------"
flutter build web --release
.PHONY: build-apk
build-apk:
@echo "-------------------------"
@echo "- Build apk for release -"
@echo "-------------------------"
flutter build apk --release
.PHONY: build-apk-split
build-apk-split:
@echo "-----------------------------------------"
@echo "- Build apk for release (split per abi) -"
@echo "-----------------------------------------"
flutter build apk --release --split-per-abi
.PHONY: build-appbundle
build-appbundle:
@echo "-------------------------------"
@echo "- Build appbundle for release -"
@echo "-------------------------------"
flutter build appbundle --release
.PHONY: build
build: build-web build-apk build-apk-split build-appbundle
.PHONY: pull
pull:
@echo "------------------------"
@echo "- Pulling last changes -"
@echo "------------------------"
git checkout main
git pull
.PHONY: full
full: install pull clean update lint test build
.PHONY: icons
icons:
@echo "--------------------------------------"
@echo "- Generate icons from icons/logo.svg -"
@echo "--------------------------------------"
inkscape -w 1024 -h 1024 icons/logo.svg -o icons/logo.png
inkscape -w 512 -h 512 icons/logo.svg -o icons/logo512.png
inkscape -w 1200 -h 1200 icons/logo.svg -o /tmp/1200.png
flutter pub run flutter_launcher_icons:main
inkscape -w 32 -h 32 icons/logo.svg -o web/favicon.png
inkscape -w 192 -h 192 icons/logo.svg -o web/icons/Icon-192.png
convert icons/logo.png -resize 140x140 -gravity center -background "#104068" -extent 192x192 web/icons/Icon-maskable-192.png
inkscape -w 512 -h 512 icons/logo.svg -o web/icons/Icon-512.png
convert icons/logo.png -resize 400x400 -gravity center -background "#104068" -extent 512x512 web/icons/Icon-maskable-512.png
inkscape -w 1024 -h 500 icons/feature_graphic.svg -o icons/feature_graphic.png
.PHONY: docs
docs:
@echo "-----------------"
@echo "- Generate docs -"
@echo "-----------------"
flutter pub global run dartdoc:dartdoc
.PHONY: release
release:
@echo "--------------------------"
@echo "- Generate a new release -"
@echo "--------------------------"
cz bump --changelog --changelog-to-stdout
@echo "Update the build number in pubspec.yaml."
@echo "Write the previous changelog for all supported languages and then run make publish."
.PHONY: publish
publish:
@echo "-------------------------"
@echo "- Publish to Play Store -"
@echo "-------------------------"
fastlane android prod
.PHONY: build-and-publish
build-and-publish: build-appbundle publish