3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-27 05:02:35 +01:00
ergo/Makefile

42 lines
973 B
Makefile
Raw Normal View History

2020-09-22 16:15:18 +02:00
.PHONY: all install build release capdefs test smoke gofmt irctest
2017-06-24 21:41:11 +02:00
2020-05-21 17:25:30 +02:00
GIT_COMMIT := $(shell git rev-parse HEAD 2> /dev/null)
GIT_TAG := $(shell git tag --points-at HEAD 2> /dev/null | head -n 1)
2020-05-20 16:31:05 +02:00
# disable linking against native libc / libpthread by default;
# this can be overridden by passing CGO_ENABLED=1 to make
export CGO_ENABLED ?= 0
capdef_file = ./irc/caps/defs.go
all: build
2017-06-24 21:41:11 +02:00
install:
go install -v -ldflags "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)"
2020-02-10 02:51:23 +01:00
build:
go build -v -ldflags "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)"
release:
goreleaser --skip-publish --rm-dist
capdefs:
python3 ./gencapdefs.py > ${capdef_file}
test:
python3 ./gencapdefs.py | diff - ${capdef_file}
go test ./...
go vet ./...
2018-05-04 10:27:43 +02:00
./.check-gofmt.sh
2020-03-24 14:56:12 +01:00
smoke: install
2021-05-25 06:34:38 +02:00
ergo mkcerts --conf ./default.yaml || true
ergo run --conf ./default.yaml --smoke
2020-06-17 08:14:23 +02:00
gofmt:
./.check-gofmt.sh --fix
2020-09-22 16:15:18 +02:00
irctest: install
2020-09-22 16:15:18 +02:00
git submodule update --init
2021-05-26 22:03:32 +02:00
cd irctest && make ergo