Skip to content

Commit aa2261d

Browse files
authored
circleci: fix install tools (#17)
1 parent 0c0ca6f commit aa2261d

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

.circleci/config.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ orbs:
77
executors:
88
golang:
99
docker:
10-
- image: golang:1.15-buster
10+
- image: golang:1.16-buster
1111
auth:
1212
username: $DOCKERHUB_USER
1313
password: $DOCKERHUB_PASSWORD
1414
working_directory: /go/src/go.lsp.dev/protocol
1515

1616
command_vars:
17-
- cache_key: &cache_key go-mod-v1-{{ checksum "go.mod" }}-{{ checksum "go.sum" }}
18-
- cache_tools_key: &cache_tools_key go-tools-v1-{{ checksum "tools/go.mod" }}-{{ checksum "tools/go.sum" }}
17+
- cache_key: &cache_key v1-go-mod-{{ checksum "go.mod" }}-{{ checksum "go.sum" }}
18+
- cache_tools_key: &cache_tools_key v1-go-tools-{{ checksum "tools/go.mod" }}-{{ checksum "tools/go.sum" }}
1919

2020
commands:
2121
restore_dependencies:
@@ -43,7 +43,6 @@ commands:
4343
- run:
4444
name: "Download dependency tools"
4545
command: |
46-
find /go/bin/ -mindepth 1 -type f -executable | head -1
4746
if [ -z $(find ./tools/bin/ -mindepth 1 -type f -executable | head -1) ]; then
4847
make -j${CPUS} tools
4948
fi
@@ -132,7 +131,6 @@ jobs:
132131
name: Run fmt and lint for sources
133132
command: |
134133
make lint GO_LINT_FLAGS="$(circleci tests split .circleci/lint-buildtags)" JOBS=${CPUS}
135-
git add -N . && git diff --exit-code
136134
- save_cache:
137135
name: "Save module cache"
138136
key: *cache_key

Makefile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,13 @@ tools/%: ## install an individual dependent tool
116116
@${MAKE} tools/bin/$* 1>/dev/null
117117

118118
tools/bin/%: ${TOOLS_DIR}/go.mod ${TOOLS_DIR}/go.sum
119-
@if [ -z '${CI}' ]; then \
120-
cd tools; \
121-
for t in ${TOOLS}; do \
122-
if [ -z '$*' ] || [ $$(basename $$t) = '$*' ]; then \
123-
echo "Install $$t ..." >&2; \
124-
GOBIN=${TOOLS_BIN} CGO_ENABLED=0 go install -v -mod=mod ${GO_FLAGS} "$${t}"; \
125-
fi \
126-
done \
127-
fi
119+
cd tools; \
120+
for t in ${TOOLS}; do \
121+
if [ -z '$*' ] || [ $$(basename $$t) = '$*' ]; then \
122+
echo "Install $$t ..." >&2; \
123+
GOBIN=${TOOLS_BIN} CGO_ENABLED=0 go install -v -mod=mod ${GO_FLAGS} "$${t}"; \
124+
fi \
125+
done
128126

129127

130128
##@ clean

0 commit comments

Comments
 (0)