Skip to content

Commit 9cf425d

Browse files
authored
Merge pull request #36 from grafana/self-documenting-makefile
chore: improve Makefile with help, descriptions and run-sse target
2 parents fae3e09 + ccb7fb7 commit 9cf425d

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

Makefile

+19-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
1+
.DEFAULT_GOAL := help
2+
3+
.PHONY: help
4+
help: ## Print this help message.
5+
@echo "Usage: make [target]"
6+
@echo ""
7+
@echo "Targets:"
8+
@echo ""
9+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
10+
111
.PHONY: build-image
2-
build-image:
12+
build-image: ## Build the Docker image.
313
docker build -t mcp-grafana:latest .
414

515
.PHONY: lint
6-
lint:
16+
lint: ## Lint the Go code.
717
go tool -modfile go.tools.mod golangci-lint run
818

919
.PHONY: test
10-
test:
20+
test: ## Run the Go unit tests.
1121
go test ./...
1222

1323
.PHONY: test-all
14-
test-all:
24+
test-all: ## Run the Go unit and integration tests.
1525
go test -v -tags integration ./...
1626

1727
.PHONY: run
28+
run: ## Run the MCP server in stdio mode.
1829
go run ./...
30+
31+
.PHONY: run-sse
32+
run-sse: ## Run the MCP server in SSE mode.
33+
go run ./... --transport sse

0 commit comments

Comments
 (0)