Remove glide and Update Makefile

This commit is contained in:
c-bata 2017-07-18 05:25:06 +09:00
parent 7baaf91845
commit 7427a72a4a
3 changed files with 8 additions and 36 deletions

View File

@ -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}'

16
glide.lock generated
View File

@ -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: []

View File

@ -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