-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
executable file
·60 lines (49 loc) · 1.39 KB
/
Copy pathmakefile
File metadata and controls
executable file
·60 lines (49 loc) · 1.39 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
.PHONY: all build run dev test clean css help
# Default target
all: test build
# Build the application
build: css
@echo "Building application..."
@go build -o bin/ignite main.go
# Run the application (builds first)
run: build
@./bin/ignite
# Development mode (no build, just run)
dev:
@echo "Starting development server..."
@go run cmd/main.go
# Run tests
test:
@echo "Running tests..."
@go test ./...
# Build CSS assets
css:
@echo "Building CSS..."
@npm install --prefix ./public --silent
@./public/node_modules/.bin/tailwindcss -i ./public/http/css/includes.css -o ./public/http/css/tailwind.css --minify
# Clean build artifacts
clean:
@echo "Cleaning up..."
@rm -rf bin/ public/http/css/tailwind.css ignite.db
# Database operations
db-mock:
@echo "Adding mock data..."
@go run main.go -mock-data
db-clear:
@echo "Clearing database..."
@go run main.go -clear-data
db-reset: db-clear db-mock
@echo "Database reset complete"
# Help
help:
@echo "Available targets:"
@echo " build - Build the application"
@echo " run - Build and run the application"
@echo " dev - Run in development mode"
@echo " test - Run tests"
@echo " css - Build CSS assets"
@echo " clean - Clean build artifacts"
@echo " db-mock - Add mock data to database"
@echo " db-clear - Clear database"
@echo " db-reset - Reset database with mock data"
@echo " help - Show this help"