-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
180 lines (148 loc) · 4.1 KB
/
Makefile
File metadata and controls
180 lines (148 loc) · 4.1 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
.PHONY: dev dev-up dev-down dev-logs dev-clean install test test-unit test-integration test-coverage build build-clean build-docker lint lint-fix format format-check security-scan security-audit clean deploy-staging deploy-prod docs-build docs-serve release prepare
# Development environment
dev: dev-up
@echo "Starting SpecCursor development environment..."
@pnpm run --parallel dev
dev-up:
@echo "Starting Docker services..."
@docker-compose up -d
@echo "Installing dependencies..."
@pnpm install
dev-down:
@echo "Stopping development environment..."
@docker-compose down
@pnpm run --parallel dev:stop
dev-logs:
@docker-compose logs -f
dev-clean:
@echo "Cleaning development environment..."
@docker-compose down -v
@pnpm clean
# Dependencies
install:
@echo "Installing dependencies..."
@pnpm install
# Testing
test:
@echo "Running all tests..."
@pnpm test
test-unit:
@echo "Running unit tests..."
@pnpm test:unit
test-integration:
@echo "Running integration tests..."
@pnpm test:integration
test-coverage:
@echo "Running tests with coverage..."
@pnpm test:coverage
# Building
build:
@echo "Building all packages..."
@pnpm build
build-clean:
@echo "Clean build..."
@pnpm clean
@pnpm build
build-docker:
@echo "Building Docker images..."
@docker-compose build
# Code quality
lint:
@echo "Running linters..."
@pnpm lint
lint-fix:
@echo "Fixing linting issues..."
@pnpm lint:fix
format:
@echo "Formatting code..."
@pnpm format
format-check:
@echo "Checking code formatting..."
@pnpm format:check
# Security
security-scan:
@echo "Running security scans..."
@pnpm security:scan
security-audit:
@echo "Running security audits..."
@pnpm security:audit
# Utilities
clean:
@echo "Cleaning build artifacts..."
@pnpm clean
# Deployment
deploy-staging:
@echo "Deploying to staging..."
@pnpm deploy:staging
deploy-prod:
@echo "Deploying to production..."
@pnpm deploy:prod
# Documentation
docs-build:
@echo "Building documentation..."
@pnpm docs:build
docs-serve:
@echo "Serving documentation..."
@pnpm docs:serve
# Release
release:
@echo "Creating release..."
@pnpm release
# Setup
prepare:
@echo "Preparing development environment..."
@pnpm prepare
# CI-specific targets
ci-setup:
@echo "Setting up CI environment..."
@pnpm install --frozen-lockfile
@if [ -f "Cargo.toml" ]; then cargo fetch; fi
@if [ -f "requirements.txt" ]; then pip install -r requirements.txt; fi
@if [ -f "go.mod" ]; then go mod download; fi
ci-test:
@echo "Running CI tests..."
@pnpm test:unit
@pnpm test:coverage
ci-lint:
@echo "Running CI linting..."
@pnpm lint
@pnpm format:check
@pnpm type-check
ci-build:
@echo "Running CI build..."
@pnpm build
ci-security:
@echo "Running CI security checks..."
@pnpm security:audit
@if [ -f "Cargo.toml" ]; then cargo audit; fi
@if [ -f "requirements.txt" ]; then safety check; fi
# Help
help:
@echo "Available commands:"
@echo " dev - Start development environment"
@echo " dev-up - Start Docker services and install deps"
@echo " dev-down - Stop development environment"
@echo " dev-logs - Show Docker logs"
@echo " dev-clean - Clean development environment"
@echo " install - Install dependencies"
@echo " test - Run all tests"
@echo " test-unit - Run unit tests"
@echo " test-integration - Run integration tests"
@echo " test-coverage - Run tests with coverage"
@echo " build - Build all packages"
@echo " build-clean - Clean build"
@echo " build-docker - Build Docker images"
@echo " lint - Run linters"
@echo " lint-fix - Fix linting issues"
@echo " format - Format code"
@echo " format-check - Check code formatting"
@echo " security-scan - Run security scans"
@echo " security-audit - Run security audits"
@echo " clean - Clean build artifacts"
@echo " deploy-staging - Deploy to staging"
@echo " deploy-prod - Deploy to production"
@echo " docs-build - Build documentation"
@echo " docs-serve - Serve documentation"
@echo " release - Create release"
@echo " prepare - Prepare development environment"
@echo " help - Show this help"