Skip to content

Commit

Permalink
Add update tools script (#123)
Browse files Browse the repository at this point in the history
## tl;dr

- Adds a script to force your tools to match the go.mod values
- Moves some more tools to a Go install instead of Homebrew
  • Loading branch information
neekolas authored Aug 29, 2024
1 parent b8ab087 commit ac08512
Show file tree
Hide file tree
Showing 5 changed files with 896 additions and 138 deletions.
4 changes: 2 additions & 2 deletions dev/up
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ go mod tidy
git submodule update --init --recursive

if ! which forge &>/dev/null; then curl -L https://foundry.paradigm.xyz | bash ; fi
if ! which migrate &>/dev/null; then brew install golang-migrate; fi
if ! which migrate &>/dev/null; then go install github.com/golang-migrate/migrate/v4/cmd/migrate; fi
if ! which golangci-lint &>/dev/null; then brew install golangci-lint; fi
if ! which shellcheck &>/dev/null; then brew install shellcheck; fi
if ! which mockery &>/dev/null; then go install github.com/vektra/mockery/v2; fi
if ! which sqlc &> /dev/null; then go install github.com/sqlc-dev/sqlc/cmd/sqlc; fi
if ! which buf &> /dev/null; then brew install buf; fi
if ! which buf &> /dev/null; then go install github.com/bufbuild/buf/cmd/buf; fi
if ! which golines &>/dev/null; then go install github.com/segmentio/golines@latest; fi
if ! which abigen &>/dev/null; then go install github.com/ethereum/go-ethereum/cmd/abigen; fi

Expand Down
11 changes: 11 additions & 0 deletions dev/update-tools
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

go mod tidy

go install github.com/vektra/mockery/v2
go install github.com/sqlc-dev/sqlc/cmd/sqlc
go install github.com/segmentio/golines@latest
go install github.com/ethereum/go-ethereum/cmd/abigen
go install github.com/golang-migrate/migrate/v4/cmd/migrate
go install github.com/bufbuild/buf/cmd/buf
Loading

0 comments on commit ac08512

Please sign in to comment.