From 79bcaa4eb450f0b1c8e06821e70bfbd882d8dd38 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Mon, 12 Jun 2023 10:27:10 -0400 Subject: [PATCH] Adding phonies --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c24c0cf..02c2223 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,37 @@ BINARY_NAME=obp +$DOCKER_CMD="docker --config ~/.docker/" + +.PHONY: docker docker: docker-image docker-push +.PHONY: docker-push docker-push: - docker push code.ndumas.com/ndumas/obsidian-pipeline:latest + $DOCKER_CMD push code.ndumas.com/ndumas/obsidian-pipeline:latest +.PHONY: docker-image docker-image: - docker build -t code.ndumas.com/ndumas/obsidian-pipeline:latest . + $DOCKER_CMD build -t code.ndumas.com/ndumas/obsidian-pipeline:latest . +.PHONY: alpine-binary alpine-binary: CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bin/${BINARY_NAME}-alpine cmd/obp/cmd/*.go +.PHONY: build-all build-all: alpine-binary GOOS=darwin GOARCH=amd64 go build -o bin/${BINARY_NAME}-darwin cmd/obp/*.go GOOS=linux GOARCH=amd64 go build -o bin/${BINARY_NAME}-linux cmd/obp/*.go GOOS=windows GOARCH=amd64 go build -o bin/${BINARY_NAME}-windows.exe cmd/obp/*.go -clean-all: +.PHONY: clean +clean: go clean rm -v bin/* +.PHONY: test test: go test ./... +.PHONY: test_coverage test_coverage: go test ./... -coverprofile=coverage.out