From d33f093ab5fc184d5d14bbe8f51c9284994680de Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Mon, 4 Nov 2019 19:15:25 -0800 Subject: [PATCH] should build now! --- Dockerfile | 2 +- Makefile | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index e677868..644b94a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM golang:1.13 as builder WORKDIR /go/src/github.com/sneak/feta COPY . . -RUN go get -v && make build +RUN make build WORKDIR /go RUN tar cvfz go-src.tgz src && du -sh * diff --git a/Makefile b/Makefile index fd58283..e851db3 100644 --- a/Makefile +++ b/Makefile @@ -34,11 +34,15 @@ run: build ./$(FN) clean: - rm ./$(FN) + -rm ./$(FN) build: ./$(FN) -./$(FN): *.go cmd/*/*.go +go-get: + go get -v + cd cmd/$(FN) && go get -v + +./$(FN): *.go cmd/*/*.go go-get cd cmd/$(FN) && go build -o ../../$(FN) $(GOFLAGS) . fmt: @@ -49,7 +53,10 @@ test: build-docker-image is_uncommitted: git diff --exit-code >/dev/null 2>&1 -build-docker-image: is_uncommitted clean +build-docker-image: clean + docker build -t $(IMAGENAME) . + +build-docker-image-dist: is_uncommitted clean docker build -t $(IMAGENAME):$(VERSION) -t $(IMAGENAME):latest -t $(IMAGENAME):$(BUILDTIMETAG) . dist: build-docker-image @@ -64,4 +71,4 @@ upload-docker-image: build-docker-image docker push $(IMAGENAME):$(BUILDTIMETAG) docker push $(IMAGENAME):latest -.PHONY: build fmt test is_uncommitted build-docker-image dist hub upload-docker-image clean run rundebug default +.PHONY: build fmt test is_uncommitted build-docker-image dist hub upload-docker-image clean run rundebug default build-docker-image-dist