-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 1.09 KB
/
Makefile
File metadata and controls
39 lines (28 loc) · 1.09 KB
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
34
35
36
37
38
39
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo "none")
DATE ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
SKILL_VERSION ?= $(shell ./scripts/skill-version.sh 2>/dev/null || echo "dev")
LDFLAGS = -X github.com/airbytehq/airbyte-agent-cli/cmd.Version=$(VERSION) \
-X github.com/airbytehq/airbyte-agent-cli/cmd.Commit=$(COMMIT) \
-X github.com/airbytehq/airbyte-agent-cli/cmd.Date=$(DATE) \
-X github.com/airbytehq/airbyte-agent-cli/cmd.ExpectedSkillVersion=$(SKILL_VERSION)
.PHONY: build generate test lint vet fmt check install clean
build: generate
go build -ldflags "$(LDFLAGS)" -o airbyte-agent .
generate:
go generate ./...
test:
go test ./... -v
fmt:
gofmt -w .
go mod tidy
vet:
go vet ./...
lint:
@command -v golangci-lint >/dev/null 2>&1 || { echo "golangci-lint not installed. Install: brew install golangci-lint"; exit 1; }
golangci-lint run
check: fmt vet lint test
install:
go install -ldflags "$(LDFLAGS)"
clean:
rm -f airbyte-agent