This repository has been archived on 2024-07-28. You can view files and clone it, but cannot push or open issues or pull requests.
cairde/makefile
decentral1se 60d3c0bf97
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
WIP: buffers and command history [ci skip]
2024-02-04 11:38:11 +01:00

33 lines
565 B
Makefile

COMMIT := $(shell git rev-list -1 HEAD)
LDFLAGS := "-X 'main.Commit=$(COMMIT)'"
DIST_LDFLAGS := $(LDFLAGS)" -s -w"
.PHONY: format check clean build run loc test
DEFAULT: run
format:
@gofmt -s -w ./...
check:
@test -z $$(gofmt -l .) || \
(echo "gofmt: formatting issue - run 'make format' to resolve" && exit 1)
ci:
@golangci-lint run ./...
build:
@go build -ldflags=$(DIST_LDFLAGS) ./cmd/cairde
run: build
@./cairde
loc:
@find . -name "*.go" | xargs wc -l
test:
@go test ./... -cover -v
release:
@goreleaser release --snapshot --clean