Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Install tools locally to guarantee same version
Browse files Browse the repository at this point in the history
  • Loading branch information
songy23 committed Aug 9, 2019
1 parent 8371a71 commit 396b249
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
5 changes: 1 addition & 4 deletions .circleci/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ jobs:
- image: circleci/golang:1.12
steps:
- checkout
- run:
name: Install tools
command: make install-tools
- run:
name: Verify
command: make circle-ci
command: make precommit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.tools
20 changes: 9 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# All documents to be used in spell check.
ALL_DOC := $(shell find . -name '*.md' -type f | sort)
ALL_DOCS := $(shell find . -name '*.md' -type f | sort)

MISSPELL=misspell -error
MISSPELL_CORRECTION=misspell -w
TOOLS_DIR := ./.tools

.PHONY: circle-ci
circle-ci: misspell
$(TOOLS_DIR)/misspell: go.mod go.sum internal/tools.go
go build -o $(TOOLS_DIR)/misspell github.com/client9/misspell/cmd/misspell

.PHONY: precommit
precommit: $(TOOLS_DIR)/misspell misspell

.PHONY: misspell
misspell:
$(MISSPELL) $(ALL_DOC)
$(TOOLS_DIR)/misspell -error $(ALL_DOCS)

.PHONY: misspell-correction
misspell-correction:
$(MISSPELL_CORRECTION) $(ALL_DOC)
$(TOOLS_DIR)/misspell -w $(ALL_DOCS)

.PHONY: install-tools
install-tools:
GO111MODULE=on go install \
github.com/client9/misspell/cmd/misspell

0 comments on commit 396b249

Please sign in to comment.