forked from hamaluik/timecop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (45 loc) · 1.18 KB
/
Makefile
File metadata and controls
54 lines (45 loc) · 1.18 KB
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
49
50
51
52
53
54
ROOT := $(shell git rev-parse --show-toplevel)
FLUTTER := $(shell which flutter)
DART := $(shell which dart)
FLUTTER_BIN_DIR := $(shell dirname $(FLUTTER))
FLUTTER_DIR := $(FLUTTER_BIN_DIR:/bin=)
CLIENT_DIR := openapi
.PHONY: run
run:
$(FLUTTER) run
.PHONY: analyze
analyze:
$(FLUTTER) analyze
.PHONY: format
format:
$(DART) format .
.PHONY: check-format
check-format:
$(DART) format . --set-exit-if-changed
.PHONY: test
test:
$(FLUTTER) test
.PHONY: codegen
codegen:
openapi-generator generate \
-i https://raw.githubusercontent.com/TimeCopSync/timecopsync_projects_api/refs/heads/main/priv/static/swagger.json \
-g dart \
-o $(CLIENT_DIR) \
-pubName=$(CLIENT_DIR) \
-pubAuthor=timecopsync-project \
-pubAuthorEmail=yann.pomie@laposte.net \
-pubDescription="Api client to interact with a timecopsync endpoint (generated with openapi-generator)" \
-pubName=timecopsync_api \
--minimal-update
rm -v $(CLIENT_DIR)/.travis.yml
rm -v $(CLIENT_DIR)/git_push.sh
$(DART) format $(CLIENT_DIR)
.PHONY: setup
setup: codegen
$(DART) run tool/setup_git_hooks.dart
.PHONY: ci
ci:
$(FLUTTER) pub get
$(DART) format . -o none --set-exit-if-changed
$(FLUTTER) analyze
$(FLUTTER) test