1
0

Makefile 1003 B

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