-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (35 loc) · 1.02 KB
/
Makefile
File metadata and controls
43 lines (35 loc) · 1.02 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
.PHONY: build test clean release help version
VERSION := $(shell cat VERSION)
BINARY_NAME := insightloop-collector
BUILD_DIR := bin
# Default target
all: build
# Help message
help:
@echo "InsightLoop Collector Makefile"
@echo "Usage:"
@echo " make build - Build the binary for the current platform"
@echo " make test - Run all tests"
@echo " make clean - Remove build artifacts"
@echo " make release - Build for all supported platforms"
@echo " make version - Display current version"
@echo " make help - Show this help message"
# Build the binary
build:
@echo "Building $(BINARY_NAME) version $(VERSION)..."
@./scripts/build.sh
# Build for all platforms
release:
@echo "Building $(BINARY_NAME) version $(VERSION) for all platforms..."
@BUILD_ALL=true ./scripts/build.sh
# Run tests
test:
@echo "Running tests..."
@go test -v ./...
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
@rm -rf $(BUILD_DIR)
# Display version
version:
@echo "$(BINARY_NAME) version $(VERSION)"