forked from go-vikunja/app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (36 loc) · 1.02 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
GIT_LAST_COMMIT := $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
FLUTTER ?= flutter
ifneq ($(DRONE_BUILD_NUMBER),)
VERSION ?= $(DRONE_BUILD_NUMBER)
else
VERSION ?= 1
endif
.PHONY: test
test:
$(FLUTTER) test
.PHONY: build-all
build-all: build-release build-debug build-profile
.PHONY: build-release
build-release:
$(FLUTTER) build apk --release --build-number=$(VERSION) --flavor main
.PHONY: build-debug
build-debug:
$(FLUTTER) build apk --debug --build-number=$(VERSION) --flavor unsigned
.PHONY: build-profile
build-profile:
$(FLUTTER) build apk --profile --build-number=$(VERSION) --flavor unsigned
.PHONY: build-ios
build-ios:
$(FLUTTER) build ios --release --build-number=$(VERSION) --no-codesign
.PHONY: format
format:
$(FLUTTER) format lib
.PHONY: format-check
format-check:
@diff=$$(flutter format -n lib); \
if [ -n "$$diff" ]; then \
echo "The following files are not formatted correctly:"; \
echo "$${diff}"; \
echo "Please run 'make format' and commit the result."; \
exit 1; \
fi;