forked from morlfm/parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 981 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
include ./config.mk
SHELL := /bin/bash
IMAGE_NAME := golangtest
CONTAINER_NAME := golang-container
## Docker
build:
@docker build -t ${IMAGE_NAME} .
enter-container:
@docker run -e AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" -e AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" -it --name ${CONTAINER_NAME} ${IMAGE_NAME} sh
run-docker:
@docker run -e AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" -e AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" --name ${CONTAINER_NAME} ${IMAGE_NAME}
run-tests-docker:
@docker run ${IMAGE_NAME} sh -c ''
env-down:
@docker stop ${CONTAINER_NAME}
@docker rm ${CONTAINER_NAME}
env-up:
@docker compose up -d
## Local
run-test:
@export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}"
@export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}"
@cd application/parser && go test
run-local:
@export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}"
@export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}"
@cd cmd && go run main.go ../input/${roster}.csv