forked from chrisfair/proxmox-ova-installer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (38 loc) · 693 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (38 loc) · 693 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
# Name of binary targets
BINARIES := importova exportova
# Default target
.PHONY: all
all: build
# Build all binaries
build:
@for b in $(BINARIES); do \
go build -o bin/$$b ./cmd/$$b; \
done
@echo "Binaries built in bin/"
# Run all tests
.PHONY: test
test:
go test ./...
@echo "All tests passed"
# Run just unit tests
.PHONY: unit
unit:
@go test ./internal/...
@echo "All unit tests passed"
# Lint
.PHONY: lint
lint:
@golangci-lint run ./...
@echo "Linting passed"
# Format code
.PHONY: fmt
fmt:
@go fmt ./...
@gofmt -w -s .
@go mod tidy
@golangci-lint run --fix ./...
@echo "Code formatted"
# Clean build artifacts
clean:
@rm -rf bin/*
@echo "Cleaned build artifacts"