-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 745 Bytes
/
Makefile
File metadata and controls
33 lines (23 loc) · 745 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
28
29
30
31
32
33
BINARY_NAME=langsmith
VERSION?=$(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
COMMIT?=$(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
DATE?=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
LDFLAGS=-ldflags "-s -w -X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(DATE)"
.PHONY: build clean test test-integration lint vet fmt install
build:
CGO_ENABLED=0 go build $(LDFLAGS) -o bin/$(BINARY_NAME) ./cmd/langsmith
install:
CGO_ENABLED=0 go install $(LDFLAGS) ./cmd/langsmith
clean:
rm -rf bin/
test:
go test -v ./...
test-integration:
go test -tags=integration -v -run Integration ./internal/cmd/
lint:
golangci-lint run
vet:
go vet ./...
fmt:
gofmt -w .
all: fmt vet test build