Remove glide and Update Makefile
This commit is contained in:
parent
7baaf91845
commit
7427a72a4a
20
Makefile
20
Makefile
@ -1,33 +1,29 @@
|
|||||||
NAME := prompt
|
NAME := prompt
|
||||||
VERSION := $(shell git describe --tags --abbrev=0)
|
|
||||||
REVISION := $(shell git rev-parse --short HEAD)
|
|
||||||
LDFLAGS := -X 'main.version=$(VERSION)' \
|
|
||||||
-X 'main.revision=$(REVISION)'
|
|
||||||
|
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
|
.PHONY: setup
|
||||||
setup: ## Setup for required tools.
|
setup: ## Setup for required tools.
|
||||||
go get github.com/Masterminds/glide
|
|
||||||
go get github.com/golang/lint/golint
|
go get github.com/golang/lint/golint
|
||||||
go get golang.org/x/tools/cmd/goimports
|
go get golang.org/x/tools/cmd/goimports
|
||||||
|
go get golang.org/x/tools/cmd/stringer
|
||||||
|
go get github.com/pkg/term
|
||||||
glide install
|
glide install
|
||||||
|
|
||||||
|
.PHONY: fmt
|
||||||
fmt: ## Formatting source codes.
|
fmt: ## Formatting source codes.
|
||||||
@goimports -w $$(glide nv -x)
|
@goimports -w $$(glide nv -x)
|
||||||
|
|
||||||
|
.PHONY: lint
|
||||||
lint: ## Run golint and go vet.
|
lint: ## Run golint and go vet.
|
||||||
@golint $$(glide novendor)
|
@golint $$(glide novendor)
|
||||||
@go vet $$(glide novendor)
|
@go vet $$(glide novendor)
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
test: ## Run the tests.
|
test: ## Run the tests.
|
||||||
@go test $$(glide novendor)
|
@go test $$(glide novendor)
|
||||||
|
|
||||||
build: main.go ## Build a binary.
|
.PHONY: help
|
||||||
go build -ldflags "$(LDFLAGS)"
|
|
||||||
|
|
||||||
help: ## Show help text
|
help: ## Show help text
|
||||||
@echo "Commands:"
|
@echo "Commands:"
|
||||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-10s\033[0m %s\n", $$1, $$2}'
|
||||||
|
|
||||||
.PHONY: setup fmt lint test help build
|
|
||||||
|
|
||||||
|
16
glide.lock
generated
16
glide.lock
generated
@ -1,16 +0,0 @@
|
|||||||
hash: bb69bb221f43716e887459af6c27ad3c6bce1f753e7897877ac3d9095e857220
|
|
||||||
updated: 2017-07-18T02:11:32.882224223+09:00
|
|
||||||
imports:
|
|
||||||
- name: github.com/pkg/term
|
|
||||||
version: b1f72af2d63057363398bec5873d16a98b453312
|
|
||||||
subpackages:
|
|
||||||
- termios
|
|
||||||
- name: golang.org/x/sys
|
|
||||||
version: 4cd6d1a821c7175768725b55ca82f14683a29ea4
|
|
||||||
subpackages:
|
|
||||||
- unix
|
|
||||||
- name: golang.org/x/tools
|
|
||||||
version: d83db204cec938a53072124e16d79022316b3dc5
|
|
||||||
subpackages:
|
|
||||||
- cmd/stringer
|
|
||||||
testImports: []
|
|
@ -1,8 +0,0 @@
|
|||||||
package: github.com/c-bata/go-prompt
|
|
||||||
import:
|
|
||||||
- package: github.com/pkg/term
|
|
||||||
subpackages:
|
|
||||||
- termios
|
|
||||||
- package: golang.org/x/tools
|
|
||||||
subpackages:
|
|
||||||
- cmd/stringer
|
|
Loading…
Reference in New Issue
Block a user