Skip to content

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
happytreees committed Sep 26, 2024
1 parent d70c9b5 commit 9687a9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ go.work.sum

# env file
.env


build/
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ endif

ARTIFACT_NAME = external-dns-vultr-webhook


REGISTRY ?= localhost:5001
IMAGE_NAME ?= external-dns-vultr-webhook
IMAGE_TAG ?= latest
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 9687a9d

Please sign in to comment.