Skip to content

Commit f7e5273

Browse files
authored
Makefile: update target (#449)
Add sqlc-dev as a dependency of the "regen" target to lower the possibility that someone is running regenerate with an out of date sqlc binary. Also update the docs to refer to the Make target instead of the script.
1 parent 7310299 commit f7e5273

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ test:
77
sqlc-dev:
88
go build -o ~/bin/sqlc-dev --tags=exp ./cmd/sqlc/
99

10-
regen:
10+
regen: sqlc-dev
1111
./scripts/regenerate.sh

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ scopes the override behavior to just a single package:
350350

351351
```yaml
352352
version: "1"
353-
packages:
353+
packages:
354354
- overrides: [...]
355355
```
356356

@@ -464,7 +464,7 @@ go build -o ~/go/bin/sqlc-dev ./cmd/sqlc
464464
### Running Tests
465465

466466
To run the tests, include the `exp` tag. Without this tag, a few tests will
467-
fail.
467+
fail.
468468

469469
```
470470
go test --tags=exp ./...
@@ -494,9 +494,12 @@ If you need to update a large number of expected test output in the
494494
`internal/endtoend/testdata` directory, run the `regenerate.sh` script.
495495

496496
```
497-
./scripts/regenerate.sh
497+
make regen
498498
```
499499

500+
Note that this uses the `sqlc-dev` binary, not `sqlc` so make sure you have an
501+
up to date `sqlc-dev` binary.
502+
500503
## Acknowledgements
501504

502505
sqlc was inspired by [PugSQL](https://pugsql.org/) and

0 commit comments

Comments
 (0)