Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (40 loc) · 1.82 KB
/
Copy pathMakefile
File metadata and controls
59 lines (40 loc) · 1.82 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.DEFAULT_GOAL := help
BIN := bin/flexprice
.PHONY: build install run test lint lint-fix fmt vet tidy docs bootstrap-commands \
smoke e2e release-snapshot release clean check help
build: ## Build the flexprice binary into bin/
go build -o $(BIN) ./cmd/flexprice
install: ## Install flexprice to $GOBIN (or $GOPATH/bin)
go install ./cmd/flexprice
run: build ## Build and run the binary, e.g. make run ARGS="customers list"
$(BIN) $(ARGS)
test: ## Run the test suite with the race detector
go test -race ./...
lint: ## Run golangci-lint
golangci-lint run ./...
lint-fix: ## Run golangci-lint and apply auto-fixes where possible
golangci-lint run --fix ./...
fmt: ## Format all Go source with gofmt
gofmt -l -w .
vet: ## Run go vet
go vet ./...
tidy: ## Tidy go.mod/go.sum
go mod tidy
docs: ## Regenerate the command reference under docs/
go run ./tools/gendocs
bootstrap-commands: ## Print operations from the embedded spec missing a name in spec/commands.yaml
go run ./tools/bootstrap-commands
smoke: build ## Run the smoke suite (no API key needed; set FLEXPRICE_API_KEY for live phases)
./scripts/smoke.sh
e2e: build ## Run the full lifecycle suite against the India region (needs FLEXPRICE_API_KEY)
./scripts/e2e.sh
release-snapshot: ## Build release binaries locally without publishing (needs goreleaser)
goreleaser release --snapshot --clean
release: ## Cut a real release — run from a v* tag, needs goreleaser and GITHUB_TOKEN
goreleaser release --clean
clean: ## Remove build artifacts (bin/, dist/, generated docs)
rm -rf bin dist
find docs -maxdepth 1 -name '*.md' -delete
check: build vet test lint ## Run everything CI runs: build, vet, test, lint
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*## ' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'