-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (51 loc) · 1.42 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
#--- Makefile common
# COLORS
RED := $(shell tput -Txterm setaf 1)
GREEN := $(shell tput -Txterm setaf 2)
YELLOW := $(shell tput -Txterm setaf 3)
CYAN := $(shell tput -Txterm setaf 6)
WHITE := $(shell tput -Txterm setaf 7)
RESET := $(shell tput -Txterm sgr0)
$(info ${YELLOW}###################${RESET})
$(info ${YELLOW}# ${WHITE}Traktify TVTime ${YELLOW}#)
$(info ${YELLOW}###################${RESET})
$(info )
TARGET_MAX_CHAR_NUM=20
## show help
help:
@echo ''
@echo '${YELLOW}Usage${RESET}:'
@echo ' make <target>'
@echo ''
@echo '${YELLOW}Targets${RESET}:'
@awk '/^[a-zA-Z\-\\_0-9]+:/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")-1); \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
printf " ${GREEN}%-$(TARGET_MAX_CHAR_NUM)s${RESET} %s\n", helpCommand, helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
#--- /end of Makefile common
####
## globals
########################
DOCKER_COMPOSE = @docker compose
####
## docker-compose tasks
########################
## docker: pull and build
build:
$(DOCKER_COMPOSE) build --pull
## docker: pull and build without cache
build-nocache:
$(DOCKER_COMPOSE) build --pull --no-cache
.PHONY: build build-nocache
####
## main script
########################
## Run the download script inside the container
traktifytvtime:
$(DOCKER_COMPOSE) run traktifytvtime