Makefile 552 B

12345678910111213141516171819202122232425262728
  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. psql:
  17. PGPASSWORD=mysecretpassword psql --host=127.0.0.1 --port=5432 --username=postgres dinotest
  18. mysqlsh:
  19. mysqlsh --sql --user root --password mysecretpassword --database dinotest 127.0.0.1:3306