You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 813B

12345678910111213141516171819202122232425262728293031323334353637
  1. .PHONY: all install build release capdefs test smoke gofmt irctest
  2. GIT_COMMIT := $(shell git rev-parse HEAD 2> /dev/null)
  3. GIT_TAG := $(shell git tag --points-at HEAD 2> /dev/null | head -n 1)
  4. capdef_file = ./irc/caps/defs.go
  5. all: install
  6. install:
  7. go install -v -ldflags "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)"
  8. build:
  9. go build -v -ldflags "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)"
  10. release:
  11. goreleaser --skip-publish --rm-dist
  12. capdefs:
  13. python3 ./gencapdefs.py > ${capdef_file}
  14. test:
  15. python3 ./gencapdefs.py | diff - ${capdef_file}
  16. go test ./...
  17. go vet ./...
  18. ./.check-gofmt.sh
  19. smoke:
  20. ergo mkcerts --conf ./default.yaml || true
  21. ergo run --conf ./default.yaml --smoke
  22. gofmt:
  23. ./.check-gofmt.sh --fix
  24. irctest:
  25. git submodule update --init
  26. cd irctest && make ergo