-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (37 loc) · 949 Bytes
/
Makefile
File metadata and controls
53 lines (37 loc) · 949 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
47
48
49
50
51
52
53
BINARY_NAME=ask
.PHONY: all build build-desktop install-wails check-wails test clean run deps fmt vet lint install coverage setup-hooks
all: test build
setup-hooks:
git config core.hooksPath .githooks
@echo "Git hooks installed from .githooks/"
build:
go build -o $(BINARY_NAME) main.go
build-desktop: check-wails
@echo "Building desktop application..."
wails build
install-wails:
@echo "Installing Wails..."
go install github.com/wailsapp/wails/v2/cmd/wails@latest
check-wails:
@which wails > /dev/null || (echo "Wails not found. Please run 'make install-wails'" && exit 1)
test:
go test -v ./...
clean:
go clean
rm -f $(BINARY_NAME)
run:
go run main.go
deps:
go mod download
fmt:
go fmt ./...
vet:
go vet ./...
lint:
golangci-lint run ./...
install:
go install
coverage:
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report generated: coverage.html"