packageized
This commit is contained in:
8
Makefile
8
Makefile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user