forked from dump247/ec2metaproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (25 loc) · 830 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
PROJECT_ROOT:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PROJECT_PACKAGE=github.com/dump247/ec2metaproxy
DOCKER_IMAGE=docker.strava.com/strava/ec2metaproxy:dtw-redirect
GO15VENDOREXPERIMENT=1
SRC_DIRS=${PROJECT_PACKAGE}
CMD_DIRS=${PROJECT_PACKAGE}
.PHONY: clean build test compile fmt docker-image
build: fmt test compile
compile:
go install ${CMD_DIRS}
test:
go test ${SRC_DIRS}
lint:
golint ${SRC_DIRS}
fmt:
go fmt ${SRC_DIRS}
clean:
go clean -i ${SRC_DIRS}
docker-image: clean
docker build -t dump247/ec2metaproxy-build -f Dockerfile.build .
docker run --rm -v ${GOPATH}:/go -w=/go/src/${PROJECT_PACKAGE} dump247/ec2metaproxy-build make
@cp ${PROJECT_ROOT}/Dockerfile ${GOPATH}/bin/
docker build -t ${DOCKER_IMAGE} ${GOPATH}/bin/
push-docker-image: docker-image
docker push ${DOCKER_IMAGE}