Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Ladicle committed May 18, 2019
1 parent e812bfb commit 16b1215
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
REPO_NAME=kubectl-bindrole
PKGROOT=github.com/Ladicle/kubectl-bindrole
VERSION ?= $(shell git rev-parse --short HEAD)
OUTDIR=_output

build:
GO111MODULE=on CGO_ENABLED=0 go build -ldflags "-w -X $(PKGROOT)/cmd.version=$(VERSION) -X $(PKGROOT)/cmd.command=$(REPO_NAME)" -o $(OUTDIR)/kubectl-bindrole
install:
GO111MODULE=on CGO_ENABLED=0 go install -ldflags "-w -X $(PKGROOT)/cmd.version=$(VERSION) -X $(PKGROOT)/cmd.command=$(REPO_NAME)"
check:
GO111MODULE=on go vet $(PKGROOT)/...
./test

.PHONY: clean
clean:
-rm -r $(OUTDIR)

0 comments on commit 16b1215

Please sign in to comment.