prometheus-jitsi-meet-exporter/Makefile

44 lines
940 B
Makefile
Raw Permalink Normal View History

2020-03-21 20:53:50 +01:00
GOCMD = go
GOBUILD = $(GOCMD) build
GOCLEAN = $(GOCMD) clean
GOTEST = $(GOCMD) test
GOVET = $(GOCMD) vet
GOGET = $(GOCMD) get
GOX = $(GOPATH)/bin/gox
GOGET = $(GOCMD) get
2020-03-21 21:19:32 +01:00
GOX_ARGS = -output="$(BUILD_DIR)/{{.Dir}}-{{.OS}}-{{.Arch}}" -osarch="linux/amd64 darwin/amd64 freebsd/amd64"
2020-03-21 20:53:50 +01:00
BUILD_DIR = build
BINARY_NAME = prometheus-jitsi-meet-exporter
all: clean vet test build
build:
$(GOBUILD) -o $(BUILD_DIR)/$(BINARY_NAME) -v
vet:
${GOVET} ./...
test:
${GOTEST} ./...
coverage:
${GOTEST} -coverprofile=coverage.txt -covermode=atomic ./...
clean:
$(GOCLEAN)
rm -f $(BUILD_DIR)/*
run: build
./$(BUILD_DIR)/$(BINARY_NAME)
release:
${GOGET} -u github.com/mitchellh/gox
${GOX} -ldflags "${LD_FLAGS}" ${GOX_ARGS}
docker:
docker build --rm --force-rm --no-cache -t systemli/prometheus-jitsi-meet-exporter .
.PHONY: all vet test coverage clean build run release docker