-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (19 loc) · 754 Bytes
/
Makefile
File metadata and controls
27 lines (19 loc) · 754 Bytes
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
BINARY := msc
MODULE := github.com/redboard/mintlify-search-cli
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
LDFLAGS := -ldflags "-s -w -X $(MODULE)/internal/cli.Version=$(VERSION) -X $(MODULE)/internal/mcp.ClientVersion=$(VERSION)"
.PHONY: build test test-integration lint vet install clean
build:
go build $(LDFLAGS) -o $(BINARY) ./cmd/msc
test:
go test -race ./...
test-integration:
go test -tags=integration ./integration/...
vet:
go vet ./...
lint: vet
@which golangci-lint > /dev/null 2>&1 && golangci-lint run ./... || echo "golangci-lint not installed, skipping"
install: build
cp $(BINARY) $(GOPATH)/bin/$(BINARY) 2>/dev/null || cp $(BINARY) /usr/local/bin/$(BINARY)
clean:
rm -f $(BINARY)