Skip to content

Commit cac508c

Browse files
CopilotBaseMax
andcommitted
Add Makefile for easier development workflow
Co-authored-by: BaseMax <2658040+BaseMax@users.noreply.github.com>
1 parent 4d30ffc commit cac508c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.PHONY: build test install clean run help
2+
3+
# Binary name
4+
BINARY_NAME=go-config-diff
5+
6+
# Build the binary
7+
build:
8+
@echo "Building $(BINARY_NAME)..."
9+
@go build -o $(BINARY_NAME) ./cmd/go-config-diff
10+
11+
# Run tests
12+
test:
13+
@echo "Running tests..."
14+
@go test ./... -v
15+
16+
# Install the binary
17+
install:
18+
@echo "Installing $(BINARY_NAME)..."
19+
@go install ./cmd/go-config-diff
20+
21+
# Clean build artifacts
22+
clean:
23+
@echo "Cleaning..."
24+
@rm -f $(BINARY_NAME)
25+
@go clean
26+
27+
# Run the application with example
28+
run: build
29+
@echo "Running example..."
30+
@./$(BINARY_NAME) examples/config1.yaml examples/config2.yaml || true
31+
32+
# Show help
33+
help:
34+
@echo "Available targets:"
35+
@echo " build - Build the binary"
36+
@echo " test - Run tests"
37+
@echo " install - Install the binary to GOPATH/bin"
38+
@echo " clean - Clean build artifacts"
39+
@echo " run - Build and run with example files"
40+
@echo " help - Show this help message"

0 commit comments

Comments
 (0)