Skip to content

Commit

Permalink
Add make target to install go1.18 tools
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-congo committed Feb 22, 2024
1 parent 6cd71e4 commit 2143942
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ jobs:
with:
redis-version: ${{ matrix.redis }}

- name: Install client dependencies
- name: Install tools for Go 1.18
if: ${{ matrix.go == '1.18' }}
working-directory: ./go
run: make install-tools-go1.18

- name: Install tools for Go 1.21
if: ${{ matrix.go == '1.21' }}
working-directory: ./go
run: make install-tools

Expand Down Expand Up @@ -140,7 +146,13 @@ jobs:
echo "/usr/local/go/bin" >> $GITHUB_PATH
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Install client dependencies
- name: Install tools for Go 1.18
if: ${{ matrix.go == '1.18.10' }}
working-directory: ./go
run: make install-tools-go1.18

- name: Install tools for Go 1.21
if: ${{ matrix.go == '1.21.6' }}
working-directory: ./go
run: make install-tools

Expand Down
11 changes: 8 additions & 3 deletions go/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
install-tools-go1.18:
go install github.com/vakenbolt/[email protected]
go install google.golang.org/protobuf/cmd/[email protected]
go install mvdan.cc/[email protected]
go install golang.org/x/tools/cmd/[email protected]
go install honnef.co/go/tools/cmd/[email protected]

install-tools:
go install github.com/vakenbolt/[email protected]
go install google.golang.org/protobuf/cmd/[email protected]
go install mvdan.cc/[email protected]
go install golang.org/x/tools/cmd/[email protected]
go_minor=$$(go version | sed 's/.* go\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'); \
if [ "$$go_minor" -eq 18 ]; then staticcheck_version=v0.3.3; else staticcheck_version=v0.4.6; fi; \
go install honnef.co/go/tools/cmd/staticcheck@$$staticcheck_version
go install honnef.co/go/tools/cmd/[email protected]

build: build-glide-core build-glide-client generate-protobuf
go build ./...
Expand Down

0 comments on commit 2143942

Please sign in to comment.