1
0

Makefile 780 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. .PHONY: build test test-examples regen start psql mysqlsh
  2. build:
  3. go build ./...
  4. test:
  5. go test ./...
  6. test-examples:
  7. go test --tags=examples ./...
  8. regen: sqlc-dev
  9. go run ./scripts/regenerate/
  10. sqlc-dev:
  11. go build -o ~/bin/sqlc-dev ./cmd/sqlc/
  12. sqlc-pg-gen:
  13. go build -o ~/bin/sqlc-pg-gen ./internal/tools/sqlc-pg-gen
  14. start:
  15. docker-compose up -d
  16. fmt:
  17. go fmt ./...
  18. psql:
  19. PGPASSWORD=mysecretpassword psql --host=127.0.0.1 --port=5432 --username=postgres dinotest
  20. mysqlsh:
  21. mysqlsh --sql --user root --password mysecretpassword --database dinotest 127.0.0.1:3306
  22. # $ protoc --version
  23. # libprotoc 3.17.3
  24. # go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
  25. proto:
  26. protoc -I ./protos --go_out=. --go_opt=module=github.com/kyleconroy/sqlc ./protos/**/*.proto