Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ GOLANG_VERSION=1.9.3-alpine3.7
DEP_VERSION=0.4.1
OS=$(shell uname | tr '[:upper:]' '[:lower:]')
PACKAGES=$(shell go list ./...)
GOBASEDIR=src/github.com/devopsfaith/api2html

all: deps test build

docker_all: docker_deps docker_build

prepare:
@echo "Installing statik..."
@go get github.com/rakyll/statik
Expand Down Expand Up @@ -36,8 +39,12 @@ docker: server_build
docker build -t devopsfaith/api2html .
rm api2html

server_build: deps
docker run --rm -it -e "GOPATH=/go" -v "${PWD}:/go/src/github.com/devopsfaith/api2html" -w /go/src/github.com/devopsfaith/api2html golang:${GOLANG_VERSION} go build -o api2html
docker_deps:
docker run --rm -it -e "GOPATH=/go" -v "${PWD}:/go/${GOBASEDIR}" -w /go/${GOBASEDIR} lushdigital/docker-golang-dep ensure -v

docker_build:
@echo "You must run make deps or make docker_deps"
docker run --rm -it -e "GOPATH=/go" -v "${PWD}:/go/${GOBASEDIR}" -w /go/${GOBASEDIR} golang:${GOLANG_VERSION} go build -o api2html

coveralls: all
go get github.com/mattn/goveralls
Expand Down