-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 768 Bytes
/
Makefile
File metadata and controls
39 lines (31 loc) · 768 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
MIX_ENV?=dev
deps:
mix deps.get
mix deps.compile
compile: deps
mix compile
release: export MIX_ENV = prod
release: deps
mix release
run: export BOT_TOKEN = $(shell cat bot.token)
run: export PRICES_PATH = path/to/file
run: export BOARD_PATH = path/to/file
run: compile
mix run --no-halt
clean:
rm -rf _build
purge: clean
rm -rf deps
rm mix.lock
sinstall:
mix local.hex --force
mix local.rebar --force
# scompile stands for systemd compile
scompile: sinstall deps release
# srun stands for systemd run
srun: export BOT_TOKEN = $(shell cat bot.token)
srun: export PRICES_PATH = path/to/file
srun: export BOARD_PATH = path/to/file
srun: scompile
_build/prod/rel/acm_bot/bin/acm_bot foreground
.PHONY: deps compile release run clean purge scompile srun