-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (44 loc) · 810 Bytes
/
Copy pathMakefile
File metadata and controls
65 lines (44 loc) · 810 Bytes
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
# Make. https://www.gnu.org/software/make/
# Setup
.PHONY: setup
setup:
make build
.PHONY: build
build:
mix do deps.get + deps.compile + compile
.PHONY: reset
reset:
rm -fR _build deps doc
# Code Quality
.PHONY: lint
lint:
mix format --check-formatted
.PHONY: fmt
fmt:
mix format
.PHONY: analyze
analyze:
mix dialyzer
.PHONY: test
test:
mix test
.PHONY: test.watch
test.watch:
find -E lib test -regex .*exs?$ | entr -c mix test
.PHONY: test.full
test.full:
make lint \
&& make analyze \
&& make test
# Docs
.PHONY: docs
docs:
mix docs
.PHONY: docs.watch
docs.watch:
find -E . -regex .*exs?$ | grep -Ev "(\.elixir_ls|\.git|_build|deps|test)" | entr -c mix docs
# Git
branch ?= main
.PHONY: git.push
git.push:
for remote in $$(git remote); do git push $$remote $(branch); done