Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (62 loc) · 1.92 KB
/
Copy pathMakefile
File metadata and controls
74 lines (62 loc) · 1.92 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Makefile for Chisel and Mallet
# Chisel: Dagger-based Tekton executor
# Mallet: Podman-based Tekton executor
.PHONY: all build build-chisel build-mallet test lint clean help
# Default target
all: build
# Build both binaries
build: build-chisel build-mallet
# Build chisel (Dagger backend)
build-chisel:
@echo "Building chisel..."
go build -o bin/chisel ./cmd/chisel
# Build mallet (Podman backend)
build-mallet:
@echo "Building mallet..."
go build -o bin/mallet ./cmd/mallet
# Run all tests
test:
@echo "Running tests..."
go test -v ./...
# Run tests with coverage
test-coverage:
@echo "Running tests with coverage..."
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report: coverage.html"
# Run linter
lint:
@echo "Running linter..."
golangci-lint run ./...
# Clean build artifacts
clean:
@echo "Cleaning..."
rm -rf bin/
rm -f coverage.out coverage.html
# Install both binaries to GOPATH/bin
install: build
@echo "Installing chisel and mallet..."
go install ./cmd/chisel
go install ./cmd/mallet
# Quick check: build and run dry-run
check: build
@echo "Checking chisel..."
./bin/chisel run examples/simple/hello-pipelinerun.yaml --dry-run
@echo "Checking mallet..."
./bin/mallet run examples/simple/hello-pipelinerun.yaml --dry-run
# Show help
help:
@echo "Chisel & Mallet Makefile"
@echo ""
@echo "Usage:"
@echo " make Build both chisel and mallet"
@echo " make build Build both binaries"
@echo " make build-chisel Build chisel only"
@echo " make build-mallet Build mallet only"
@echo " make test Run all tests"
@echo " make test-coverage Run tests with coverage report"
@echo " make lint Run golangci-lint"
@echo " make clean Remove build artifacts"
@echo " make install Install binaries to GOPATH/bin"
@echo " make check Build and run dry-run tests"
@echo " make help Show this help"