-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (57 loc) · 1.38 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
#================================
#== DOCKER ENVIRONMENT
#================================
DOCKER := @docker
COMPOSE := @docker-compose
dcb:
${COMPOSE} build
dcuf:
ifdef f
${COMPOSE} up -d --${f}
endif
dcubf:
ifdef f
${COMPOSE} up -d --build --${f}
endif
dcu:
${COMPOSE} up -d --build
dcd:
${COMPOSE} down
#================================
#== GOLANG ENVIRONMENT
#================================
GO := @go
goinstall:
${GO} get .
godev:
${GO} run main.go
goprod:
${GO} build -o main .
gotest:
${GO} test -v
goformat:
${GO} fmt ./...
#================================
#== SCRIPTS
#================================
FETCH_CARDS := ./scripts/fetch_cards.sh
FETCH_ENUMS := ./scripts/import_enums_data.py
FETCH_BANLISTS := ./scripts/fetch_banlists.sh
FETCH_DECKS := ./scripts/fetch_decks.sh
MV_DECK_ARCHETYPES := ./scripts/generate_deck_archetypes.py
MV_TOP_ARCHETYPES := ./scripts/generate_top_archetypes.py
MV_TOP_CARDS := ./scripts/generate_top_cards.py
MV_TOP_ARCHETYPE_CARDS := ./scripts/generate_top_archetype_cards.py
MV_TOP_RELATED_CARDS := ./scripts/generate_top_related_cards.py
upsert-data:
${FETCH_CARDS}
${FETCH_ENUMS}
${FETCH_BANLISTS}
${FETCH_DECKS}
generate-views:
${MV_DECK_ARCHETYPES}
${MV_TOP_ARCHETYPES}
${MV_TOP_CARDS}
${MV_TOP_ARCHETYPE_CARDS}
${MV_TOP_RELATED_CARDS}
.PHONY: dcb dcuf dcubf dcu dcd goinstall godev goprod gotest goformat upsert-data generate-views