-
-
Notifications
You must be signed in to change notification settings - Fork 190
/
Makefile
48 lines (40 loc) · 987 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
.PHONY: all run_unit clean format lint run_web run build
all: lint format build
run_unit: ## Runs unit tests
@echo "Running flutter test..."
@flutter test || (echo "Error while running tests"; exit 1)
clean: ## Cleans the environment
@echo "Cleaning the project..."
@rm -rf pubspec.lock
@flutter clean
format:
@echo "Formatting the code"
@dart format .
lint:
@echo "Verifying code..."
@dart analyze . || (echo "Error in project"; exit 1)
run_web:
ifdef browser
@echo "Running Pangolin Desktop in $(browser)"
@flutter run -d $(browser)
else
@echo "no browser target found"
endif
run:
ifdef target
@echo "Running Pangolin Desktop"
@flutter config --enable-$(target)-desktop
@flutter create .
@flutter run -d $(target)
else
@echo "no target found"
endif
build: clean
ifdef target
@echo "Building Pangolin Desktop for $(target)."
@flutter config --enable-$(target)-desktop
@flutter create .
@flutter build $(target) --release
else
@echo "no target found"
endif