should build now!

This commit is contained in:
Jeffrey Paul 2019-11-04 19:15:25 -08:00
parent f98f22d9cc
commit d33f093ab5
2 changed files with 12 additions and 5 deletions

View File

@ -3,7 +3,7 @@ FROM golang:1.13 as builder
WORKDIR /go/src/github.com/sneak/feta WORKDIR /go/src/github.com/sneak/feta
COPY . . COPY . .
RUN go get -v && make build RUN make build
WORKDIR /go WORKDIR /go
RUN tar cvfz go-src.tgz src && du -sh * RUN tar cvfz go-src.tgz src && du -sh *

View File

@ -34,11 +34,15 @@ run: build
./$(FN) ./$(FN)
clean: clean:
rm ./$(FN) -rm ./$(FN)
build: ./$(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) . cd cmd/$(FN) && go build -o ../../$(FN) $(GOFLAGS) .
fmt: fmt:
@ -49,7 +53,10 @@ test: build-docker-image
is_uncommitted: is_uncommitted:
git diff --exit-code >/dev/null 2>&1 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) . docker build -t $(IMAGENAME):$(VERSION) -t $(IMAGENAME):latest -t $(IMAGENAME):$(BUILDTIMETAG) .
dist: build-docker-image dist: build-docker-image
@ -64,4 +71,4 @@ upload-docker-image: build-docker-image
docker push $(IMAGENAME):$(BUILDTIMETAG) docker push $(IMAGENAME):$(BUILDTIMETAG)
docker push $(IMAGENAME):latest 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