packageized

This commit is contained in:
2019-11-04 18:57:48 -08:00
parent c0987f06e6
commit f98f22d9cc
3 changed files with 14 additions and 6 deletions

View File

@@ -38,8 +38,8 @@ clean:
build: ./$(FN)
./$(FN): *.go
go build -o $@ $(GOFLAGS) .
./$(FN): *.go cmd/*/*.go
cd cmd/$(FN) && go build -o ../../$(FN) $(GOFLAGS) .
fmt:
go fmt *.go
@@ -49,7 +49,7 @@ test: build-docker-image
is_uncommitted:
git diff --exit-code >/dev/null 2>&1
build-docker-image: is_uncommitted
build-docker-image: is_uncommitted clean
docker build -t $(IMAGENAME):$(VERSION) -t $(IMAGENAME):latest -t $(IMAGENAME):$(BUILDTIMETAG) .
dist: build-docker-image
@@ -63,3 +63,5 @@ upload-docker-image: build-docker-image
docker push $(IMAGENAME):$(VERSION)
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