fix: ensure correct version of sqlc is executed (#1287)

If `/usr/local/bin` is searched before `$GOPATH/bin` in your `$PATH` the
wrong version of `sqlc` can be executed.
This commit is contained in:
Colin Adler
2022-05-04 15:09:13 -05:00
committed by GitHub
parent d7f63217f1
commit 0ccf0102d7

View File

@ -11,8 +11,7 @@ set -euo pipefail
cd "$(dirname "$0")"
# The logic below depends on the exact version being correct :(
[[ $(sqlc version) != "v1.13.0" ]] && go install github.com/kyleconroy/sqlc/cmd/sqlc@v1.13.0
sqlc generate
go run github.com/kyleconroy/sqlc/cmd/sqlc@v1.13.0 generate
first=true
for fi in queries/*.sql.go; do