-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
94 lines (68 loc) · 1.71 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
mix ?= mix
iex ?= iex
help: Makefile
@echo
@echo " Choose a command run in Lynx:"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo
## fmt: Format code.
.PHONY: fmt
fmt:
@echo ">> ============= Format code ============= <<"
@$(mix) format mix.exs "lib/**/*.{ex,exs}" "test/**/*.{ex,exs}"
## fmt_check: Check code format.
.PHONY: fmt_check
fmt_check:
@echo ">> ============= Check code format ============= <<"
@$(mix) format mix.exs "lib/**/*.{ex,exs}" "test/**/*.{ex,exs}" --check-formatted
## deps: Fetch dependencies
.PHONY: deps
deps:
@echo ">> ============= Fetch dependencies ============= <<"
@$(mix) deps.get
## test: Test code
.PHONY: test
test:
@echo ">> ============= Test code ============= <<"
@$(mix) test --trace
## build: Build code
.PHONY: build
build:
@echo ">> ============= Build code ============= <<"
@$(mix) compile --warnings-as-errors --all-warnings
## release: Release the code
.PHONY: release
release:
@echo ">> ============= Release the code ============= <<"
-rm -rf _build
# mix phx.digest
MIX_ENV=prod mix release
## i: Run interactive shell
.PHONY: i
i:
@echo ">> ============= Interactive shell ============= <<"
@$(iex) -S mix phx.server
## migrate: Create database
.PHONY: migrate
migrate:
@echo ">> ============= Create database ============= <<"
@$(mix) ecto.setup
## run: Run lynx
.PHONY: run
run:
@echo ">> ============= Run lynx ============= <<"
@$(mix) phx.server
## ecto: Run ecto
.PHONY: ecto
ecto:
@echo ">> ============= Run ecto ============= <<"
@$(mix) ecto
## v: Get version
.PHONY: v
v:
@echo ">> ============= Get application version ============= <<"
@$(mix) version
## ci: Run ci
.PHONY: ci
ci: test