1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# sportsball โ live sports TUI
BIN := sportsball
GOBIN := $(shell go env GOPATH)/bin
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
LDFLAGS := -s -w -X main.version=$(VERSION)
.PHONY: run build install test vet tidy
run: ## run the TUI
go run .
build: ## build ./sportsball in the repo
go build -ldflags "$(LDFLAGS)" -o sportsball .
install: ## build + install as `$(BIN)` on PATH
go build -ldflags "$(LDFLAGS)" -o "$(GOBIN)/$(BIN)" .
@echo "installed $(GOBIN)/$(BIN) ($(VERSION))"
test:
go test ./...
vet:
go vet ./...
tidy:
go mod tidy
|