-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
82 lines (59 loc) · 1.41 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
#!/usr/bin/make -ef
VERSION ?= $(shell cat mix.exs | grep version | sed -e 's/.*version: "\(.*\)",/\1/')
# Exporting the config values allows us to generate Dockerfile and github config using envsubst.
export KUBO_VERSION ?= v0.23.0
export DOCKER_USER ?= ipfs
export DOCKER_IMAGE ?= $(DOCKER_USER)/kubo:$(KUBO_VERSION)
all: deps format compile test
commited: templates
./.check.uncommited
compile:
mix compile
deps:
mix deps.get
docker:
mkdir -p .docker/ipfs_staging .docker_data/ipfs_data
docker-compose up -d
docs:
mix docs
xdg-open doc/index.html
cover:
mix coveralls.html
xdg-open cover/excoveralls.html
image: templates
docker build -t $(DOCKER_IMAGE) --no-cache .
format:
mix format
map:
mix xref graph --format dot
dot -Tpng xref_graph.dot -o xref_graph.png
eog xref_graph.png
mix: all
iex -S mix
proper: distclean compile test
push: all commited test
git pull
git push
publish-image: image
docker push $(DOCKER_IMAGE)
release: test publish-image
git tag $(VERSION)
mix hex.publish
git push --tags
templates:
envsubst < templates/Dockerfile > Dockerfile
envsubst < templates/testsuite.yaml > .github/workflows/testsuite.yaml
test: lint
mix format --check-formatted
mix credo
mix dialyzer
mix test
lint:
gh actionlint .github/workflows/*.yaml
distclean: clean
rm -rf _build deps mix.lock
clean:
rm -f Qm*
rm -rf cover
rm -f xref_*
.PHONY: compile docs docker test templates cover