From 9687a9dbc0e9a542d14cbb11ac0a6f0188b3ccae Mon Sep 17 00:00:00 2001 From: happytreees Date: Thu, 26 Sep 2024 11:42:02 -0400 Subject: [PATCH] update makefile --- .gitignore | 3 +++ Makefile | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6f72f89..322a0bb 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ go.work.sum # env file .env + + +build/ \ No newline at end of file diff --git a/Makefile b/Makefile index 6f43db9..dbe8263 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ endif ARTIFACT_NAME = external-dns-vultr-webhook - REGISTRY ?= localhost:5001 IMAGE_NAME ?= external-dns-vultr-webhook IMAGE_TAG ?= latest @@ -56,6 +55,10 @@ clean: ## Clean the build directory build: ## Build the binary CGO_ENABLED=0 go build -o build/bin/$(ARTIFACT_NAME) ./cmd/webhook +.PHONY: build-linux +build-linux: ## Build the binary for linux + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/bin/$(ARTIFACT_NAME) ./cmd/webhook + .PHONY: run run:build ## Run the binary on local machine build/bin/external-dns-vultr-webhook @@ -77,6 +80,9 @@ unit-test: ## Run unit tests mkdir -p build/reports $(GO_TEST) --junitfile build/reports/unit-test.xml -- -race ./... -count=1 -short -cover -coverprofile build/reports/unit-test-coverage.out +##@ Deploy +.PHONY: deploy +deploy: docker-build docker-push ##@ Release