generated from interview-templates/flutter-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (42 loc) · 905 Bytes
/
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
# Checks two given strings for equality.
eq = $(if $(or $(1),$(2)),$(and $(findstring $(1),$(2)),\
$(findstring $(2),$(1))),1)
# Resolve Flutter project dependencies.
#
# Usage:
# make deps
deps:
flutter pub get
# Format Flutter Dart sources with dartfmt.
#
# Usage:
# make fmt [check=(no|yes)]
fmt:
flutter format $(if $(call eq,$(check),yes),-n --set-exit-if-changed,) .
# Lint Flutter Dart sources with dartanalyzer.
#
# Usage:
# make lint
lint:
flutter analyze .
# Runs Flutter tests.
#
# Usage:
# make test
test:
flutter test
# Build Flutter project.
#
# Usage:
# make build [platform=(apk|ios)]
build:
flutter build $(if $(call eq,$(platform),ios),ios,apk)
# Release project on GitHub.
#
# Usage:
# make release
release:
-git tag -d latest
git tag latest
git push origin latest --force
.PHONY: deps build fmt lint release test