-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (22 loc) · 1.13 KB
/
Makefile
File metadata and controls
31 lines (22 loc) · 1.13 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
help: ## Show this help
@echo "Help"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[93m %s\n", $$1, $$2}'
VERSION=$(shell awk -F'"' '/"version":/ {print $$4}' version.json)
DATE=$(shell date -u -Iseconds)
GOFLAGS=-ldflags="-X github.com/storacha/etracker/internal/build.version=$(VERSION) -X github.com/storacha/etracker/internal/build.Date=$(DATE) -X github.com/storacha/etracker/internal/build.BuiltBy=make"
TAGS?=
.PHONY: all build etracker test clean preview-admin
all: build ## Make all targets
build: etracker client ## Build service and client binaries
etracker: ## Build the service binary
go build $(GOFLAGS) $(TAGS) -o ./etracker github.com/storacha/etracker/cmd/etracker
client: ## Build the client binary
go build $(GOFLAGS) $(TAGS) -o ./client github.com/storacha/etracker/cmd/client
preview-admin: ## Launch admin dashboard preview server with mock data
@echo "Starting admin dashboard preview server..."
go run github.com/storacha/etracker/cmd/preview-admin
test: ## Run tests
go test -v ./...
clean: ## Clean up artifacts
rm -f ./etracker
rm -f ./client