-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (18 loc) · 799 Bytes
/
Makefile
File metadata and controls
21 lines (18 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Colors for terminal output
CYAN := \033[36m
GREEN := \033[32m
RESET := \033[0m
# Version info
VERSION ?= dev
GIT_COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
DIRTY_SUFFIX := $(shell git diff --quiet 2>/dev/null || echo "-dirty")
# Build flags
LDFLAGS := -s -w \
-X github.com/ethpandaops/execution-processor/internal/version.Release=$(VERSION)-$(GIT_COMMIT) \
-X github.com/ethpandaops/execution-processor/internal/version.GitCommit=$(GIT_COMMIT)
.PHONY: build-binary
build-binary:
@printf "$(CYAN)==> Building execution-processor...$(RESET)\n"
@printf "$(CYAN) Version: $(VERSION)-$(GIT_COMMIT)$(DIRTY_SUFFIX)$(RESET)\n"
@go build -ldflags "$(LDFLAGS)" -o bin/execution-processor ./main.go
@printf "$(GREEN)✓ Built: bin/execution-processor$(RESET)\n"