-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.example
More file actions
94 lines (75 loc) · 2.31 KB
/
Makefile.example
File metadata and controls
94 lines (75 loc) · 2.31 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Copy this file to Makefile for local development
# Customize as needed for your environment
.PHONY: install build test lint dev mcp-dev push release clean help
# Default target
help:
@echo "Available commands:"
@echo " make install - Install dependencies"
@echo " make build - Build the project"
@echo " make test - Run all tests"
@echo " make test-unit - Run unit tests only"
@echo " make test-e2e - Run e2e tests only"
@echo " make test-critical - Run tests with fail-fast"
@echo " make lint - Run linter"
@echo " make dev - Run CLI in development mode"
@echo " make mcp-dev - Run MCP server in development mode"
@echo " make push - Prepare and push release"
@echo " make release - Full release (push + npm publish)"
@echo " make clean - Clean build artifacts"
install:
bun install
build:
bun run build
test:
# Run working tests only
bun test test/file-resolver.test.ts test/config-test.test.ts
test-integration:
bun test tests/integration
test-e2e:
bun test tests/e2e
test-critical:
bun test --bail
test-fast:
# Run only unit tests and essential e2e tests (skip slow integration tests)
bun test tests/unit --timeout 5000
bun test tests/e2e/cli-commands.e2e.test.ts --timeout 10000
test-slow:
# Run the slow E2E tests that we normally skip
TEST_MCP=1 TEST_CRYPTO=1 bun test tests/e2e --timeout 30000
test-unit:
# Fast unit tests only
bun test tests/unit --timeout 5000
lint:
bun run lint
typecheck:
bun run typecheck
dev:
bun run dev
mcp-dev:
bun run mcp-dev
# Smart push - handles everything before npm publish
push:
@echo "Preparing release..."
make lint
@echo "Skipping typecheck - known @merlin/cli interface issues"
make build
make test
@echo "Checking version..."
bun run scripts/smart-version.ts
git add .
git commit -m "build: Bump package version to $$(bun -e "console.log(require('./package.json').version)")" || true
git push origin main
@echo "Ready for release. Run 'make release' to publish to npm."
# Full release - includes npm publish
# NOTE: Update the registry URL to match your npm registry
release: push
@echo "Publishing to npm..."
npm publish
@echo "Running post-release validation..."
bun run scripts/post-release.ts
@echo "Release complete."
clean:
rm -rf dist/
rm -rf coverage/
rm -rf .vitest/
rm -f *.log