From 7427a72a4a6f4d4c4b9fdf9cd01548e5ab51b30b Mon Sep 17 00:00:00 2001 From: c-bata Date: Tue, 18 Jul 2017 05:25:06 +0900 Subject: [PATCH] Remove glide and Update Makefile --- Makefile | 20 ++++++++------------ glide.lock | 16 ---------------- glide.yaml | 8 -------- 3 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 glide.lock delete mode 100644 glide.yaml diff --git a/Makefile b/Makefile index 27c294e..7f2ab32 100644 --- a/Makefile +++ b/Makefile @@ -1,33 +1,29 @@ 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 +.PHONY: setup setup: ## Setup for required tools. - go get github.com/Masterminds/glide go get github.com/golang/lint/golint go get golang.org/x/tools/cmd/goimports + go get golang.org/x/tools/cmd/stringer + go get github.com/pkg/term glide install +.PHONY: fmt fmt: ## Formatting source codes. @goimports -w $$(glide nv -x) +.PHONY: lint lint: ## Run golint and go vet. @golint $$(glide novendor) @go vet $$(glide novendor) +.PHONY: test test: ## Run the tests. @go test $$(glide novendor) -build: main.go ## Build a binary. - go build -ldflags "$(LDFLAGS)" - +.PHONY: help help: ## Show help text @echo "Commands:" - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' - -.PHONY: setup fmt lint test help build - + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-10s\033[0m %s\n", $$1, $$2}' diff --git a/glide.lock b/glide.lock deleted file mode 100644 index 911fedb..0000000 --- a/glide.lock +++ /dev/null @@ -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: [] diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index e6fa496..0000000 --- a/glide.yaml +++ /dev/null @@ -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