chore(tests): update test/ci tooling to work better with go -tool support

This commit is contained in:
Gabe Kangas
2025-10-10 14:25:51 -07:00
parent 05dad9c476
commit 363a60a77d
4 changed files with 105 additions and 197 deletions
+21 -9
View File
@@ -9,20 +9,32 @@ sqlc generates **type-safe code** from SQL. Here's how it works:
Only those who need to create or update SQL queries will need to have `sqlc` installed on their system. **It is not a dependency required to build the codebase.**
## Install sqlc
## Using sqlc
### Snap
This project uses Go 1.24's native tool management. The `sqlc` tool is already defined in `go.mod`.
`sudo snap install sqlc`
After cloning the repository, ensure tools are downloaded:
### Go install
```bash
go mod download
```
`go install github.com/kyleconroy/sqlc/cmd/sqlc@latest`
Then run sqlc:
### macOS
```bash
go tool sqlc generate
```
`brew install sqlc`
## Managing Tool Versions
### Download a release
To upgrade sqlc to a specific version:
Visit <https://github.com/kyleconroy/sqlc/releases> to download a release for your environment.
```bash
go get -tool github.com/sqlc-dev/sqlc/cmd/sqlc@latest
```
To check the current version:
```bash
go list -m github.com/sqlc-dev/sqlc
```