-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (31 loc) · 1013 Bytes
/
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
#############################
## Front Matter ##
#############################
.PHONY: help
.DEFAULT_GOAL := help
include .env
export
#############################
## Targets ##
#############################
## Build images for running scripts
build:
docker build --tag "rallymap-python" src/main/docker/python
## load rallies
load:
@docker run -it --rm --name rallymap-load-rallies -e "ORS_API_KEY=${ORS_API_KEY}" -v "${PWD}":/usr/src/app -w /usr/src/app rallymap-python python src/main/python/load_rallies.py
#############################
## Help Target ##
#############################
## Show this help
help:
@printf "Available targets:\n\n"
@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 " %-20s %s\n", helpCommand, helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)