This repository has been archived on 2022-04-20. You can view files and clone it, but cannot push or open issues or pull requests.
app/Makefile

45 lines
1.0 KiB
Makefile
Raw Permalink Normal View History

2018-09-22 20:56:16 +00:00
GIT_LAST_COMMIT := $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
FLUTTER ?= flutter
2018-09-22 20:56:16 +00:00
ifneq ($(DRONE_BUILD_NUMBER),)
VERSION ?= $(DRONE_BUILD_NUMBER)
2018-09-22 20:56:16 +00:00
else
VERSION ?= 1
2018-09-22 20:56:16 +00:00
endif
.PHONY: test
test:
$(FLUTTER) test
2018-09-22 20:56:16 +00:00
.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
2018-09-22 20:56:16 +00:00
.PHONY: build-debug
build-debug:
$(FLUTTER) build apk --debug --build-number=$(VERSION) --flavor unsigned
2018-09-22 20:56:16 +00:00
.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;