Skip to content

Commit a40840c

Browse files
committed
Local binary install
1 parent b91dfb1 commit a40840c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ GOBIN=$(shell go env GOPATH)/bin
77
else
88
GOBIN=$(shell go env GOBIN)
99
endif
10-
10+
LOCALBIN ?= ~/.local/bin
1111
# CONTAINER_TOOL defines the container tool to be used for building images.
1212
# Be aware that the target commands are only tested with Docker which is
1313
# scaffolded by default. However, you might want to replace it to use other
@@ -75,6 +75,13 @@ lint-config: golangci-lint ## Verify golangci-lint linter configuration
7575
build: manifests generate fmt vet ## Build manager binary.
7676
go build -o bin/jumpstarter-lab-config cmd/*
7777

78+
.PHONY: install
79+
install: build ## Build and install jumpstarter-lab-config binary to LOCALBIN.
80+
@echo "Installing jumpstarter-lab-config to $(LOCALBIN)"
81+
@mkdir -p $(LOCALBIN)
82+
@cp bin/jumpstarter-lab-config $(LOCALBIN)/jumpstarter-lab-config
83+
@echo "Installed jumpstarter-lab-config to $(LOCALBIN)/jumpstarter-lab-config"
84+
7885
.PHONY: run
7986
run: manifests generate fmt vet ## Run a controller from your host.
8087
go run ./cmd/main.go

0 commit comments

Comments
 (0)