-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (35 loc) · 762 Bytes
/
Makefile
File metadata and controls
46 lines (35 loc) · 762 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
34
35
36
37
38
39
40
41
42
43
44
45
46
.PHONY: build lint test clean install release snapshot pre-commit pre-commit-install
# Build the binary
build:
go build -o menlo ./cmd/menlo
# Install binary locally
install: build
install -m 755 menlo /usr/local/bin/
# Build for all platforms
build-all:
goreleaser build --snapshot --clean
# Run tests
test:
go test -v ./...
# Run linter
lint:
golangci-lint run
# Clean build artifacts
clean:
rm -f menlo
rm -rf dist/
# Install locally
install: build
install -m 755 menlo /usr/local/bin/
# Install lefthook hooks
pre-commit-install:
lefthook install
# Run pre-commit checks
pre-commit:
lefthook run pre-commit
# Create a release
release:
goreleaser release --clean
# Create a snapshot release
snapshot:
goreleaser build --snapshot --clean