Skip to content

Commit

Permalink
Installation with "go install" (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
hhiroshell committed Dec 23, 2021
1 parent c334705 commit 158ec3e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
29 changes: 23 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
SOURCES := $(shell find . -name '*.go')
BINARY := kubectl-realname_diff
# This Makefile assumed to be used for local development.
GO ?= go
STATICCHECK ?= staticcheck
DIST_DIR := dist

build: kubectl-realname_diff
.PHONY: build
build:
$(GO) build -o $(DIST_DIR)/kubectl-realname_diff cmd/kubectl-realname_diff/main.go

$(BINARY): $(SOURCES)
GO111MODULE=on CGO_ENABLED=0 go build -o $(BINARY) ./cmd/kubectl-realname-diff.go
.PHONY: test
test: vet fmt lint
$(GO) test ./...

.PHONY: vet
vet:
$(GO) vet ./...

.PHONY: fmt
fmt:
$(GO) fmt ./...

.PHONY: lint
lint:
$(STATICCHECK) ./...

.PHONY: clean
clean:
rm $(BINARY)
rm -rf $(DIST_DIR)
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ diff -u -N /var/folders/2n/lgqgy6f151l5mw1x4dj_7ztw0000gn/T/LIVE-116798495/v1.Co

For a complete example, see the [example directory](./example).

## Installation
Use go install as follows:

```
$ go install github.com/hhiroshell/cmd/kubectl-realname_diff@latest
```

## License
Kubectl Real Name Diff is licensed under the Apache License 2.0, and includes works
distributed under same one.
File renamed without changes.

0 comments on commit 158ec3e

Please sign in to comment.