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

47 lines
1.3 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//')
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))-$(GIT_LAST_COMMIT)
else
ifneq ($(DRONE_BRANCH),)
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))-$(GIT_LAST_COMMIT)
else
VERSION ?= master-$(GIT_LAST_COMMIT)
endif
endif
.PHONY: test
test:
flutter test
.PHONY: build-all
build-all: build-release build-debug build-profile
.PHONY: build-release
build-release:
2018-09-23 16:04:00 +00:00
flutter build apk --release --build-name=$(VERSION) --flavor main
2018-09-22 20:56:16 +00:00
.PHONY: build-debug
build-debug:
2018-09-23 16:04:00 +00:00
flutter build apk --debug --build-name=$(VERSION) --flavor unsigned
2018-09-22 20:56:16 +00:00
.PHONY: build-profile
build-profile:
2018-09-23 16:04:00 +00:00
flutter build apk --profile --build-name=$(VERSION) --flavor unsigned
2018-09-23 14:40:29 +00:00
.PHONY: build-ios-all
2018-09-23 14:45:25 +00:00
build-ios-all: build-ios-release build-ios-debug build-ios-profile
2018-09-23 14:40:29 +00:00
.PHONY: build-ios-release
2018-09-23 14:45:25 +00:00
build-ios-release:
2018-09-23 19:32:12 +00:00
flutter build ios --release --build-name=$(VERSION) --no-codesign
2018-09-23 14:40:29 +00:00
.PHONY: build-ios-debug
2018-09-23 14:45:25 +00:00
build-ios-debug:
2018-09-23 19:32:12 +00:00
flutter build ios --debug --build-name=$(VERSION) --no-codesign
mv build/ios/iphoneos/Runner.app build/ios/iphoneos/Runner-debug.app
2018-09-23 14:40:29 +00:00
.PHONY: build-ios-profile
2018-09-23 14:45:25 +00:00
build-ios-profile:
2018-09-23 19:32:12 +00:00
flutter build ios --profile --build-name=$(VERSION) --no-codesign
mv build/ios/iphoneos/Runner.app build/ios/iphoneos/Runner-profile.app