Skip to content

Commit ac3e1f3

Browse files
committed
fix: Utilize make cache for dumping database
1 parent e8bded4 commit ac3e1f3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

coderd/database/gen/dump/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ func main() {
3636

3737
hasPGDump := false
3838
if _, err = exec.LookPath("pg_dump"); err == nil {
39-
fmt.Fprintln(os.Stderr, "yahhoo")
4039
out, err := exec.Command("pg_dump", "--version").Output()
4140
if err == nil {
4241
// Parse output:

coderd/database/generate.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
1313
(
1414
cd "$SCRIPT_DIR"
1515

16-
# Dump the updated schema.
17-
go run gen/dump/main.go
16+
echo generate 1>&2
17+
18+
# Dump the updated schema (use make to utilize caching).
19+
make -C ../.. --no-print-directory coderd/database/dump.sql
1820
# The logic below depends on the exact version being correct :(
1921
go run github.com/kyleconroy/sqlc/cmd/sqlc@v1.13.0 generate
2022

0 commit comments

Comments
 (0)