-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
36 lines (24 loc) · 1 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
OUT_DIR=./out
build: build_linux build_mac build_win
build_linux: prepare_out_dir
go build -o ${OUT_DIR}/linux.traefik-hosts-generator
build_mac: prepare_out_dir
GOOS=darwin GOARCH=amd64 go build -o ${OUT_DIR}/darwin.traefik-hosts-generator
build_win: prepare_out_dir
GOOS=windows GOARCH=amd64 go build -o ${OUT_DIR}/win.traefik-hosts-generator
docker_build: build_linux
docker build -f docker/Dockerfile ${OUT_DIR} -t zekker6/traefik-hosts-generator
docker_push: docker_build
docker push zekker6/traefik-hosts-generator
prepare_out_dir:
mkdir -p ${OUT_DIR}
test:
go test -race -short `go list ./... | grep -v /vendor/`
tests_integration_prepare:
docker network create tk_web_tests || true
docker-compose -f ./tests/integration/docker-compose.yml -p tk-hosts-tests up -d
tests_integration_stop:
docker network delete tk_web_tests
docker-compose -f ./tests/integration/docker-compose.yml -p tk-hosts-tests down
test_integration: tests_integration_prepare
go test -tags integration ./tests/integration/