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 973B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. # disable linking against native libc / libpthread by default;
  5. # this can be overridden by passing CGO_ENABLED=1 to make
  6. export CGO_ENABLED ?= 0
  7. capdef_file = ./irc/caps/defs.go
  8. all: build
  9. install:
  10. go install -v -ldflags "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)"
  11. build:
  12. go build -v -ldflags "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)"
  13. release:
  14. goreleaser --skip-publish --rm-dist
  15. capdefs:
  16. python3 ./gencapdefs.py > ${capdef_file}
  17. test:
  18. python3 ./gencapdefs.py | diff - ${capdef_file}
  19. go test ./...
  20. go vet ./...
  21. ./.check-gofmt.sh
  22. smoke: install
  23. ergo mkcerts --conf ./default.yaml || true
  24. ergo run --conf ./default.yaml --smoke
  25. gofmt:
  26. ./.check-gofmt.sh --fix
  27. irctest: install
  28. git submodule update --init
  29. cd irctest && make ergo