Added makefile

This commit is contained in:
konrad 2018-09-22 12:49:53 +02:00
parent 381a631398
commit 6799a7d33f
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 30 additions and 0 deletions

30
Makefile Normal file
View File

@ -0,0 +1,30 @@
GIT_LAST_COMMIT := $(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
else
ifneq ($(DRONE_BRANCH),)
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
else
VERSION ?= master
endif
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-name=$(VERSION)
.PHONY: build-debug
build-debug:
flutter build apk --debug --build-name=$(VERSION)
.PHONY: build-profile
build-profile:
flutter build apk --profile --build-name=$(VERSION)