-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (45 loc) · 1.48 KB
/
Makefile
File metadata and controls
55 lines (45 loc) · 1.48 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
# Borderlands SHIFT Code Manager - Production Makefile
.PHONY: test-server test build clean help firefox chrome
# Default target
help:
@echo "Borderlands SHIFT Code Manager - Production Tasks"
@echo ""
@echo "Available targets:"
@echo " test-server - Start the Python test server for development testing"
@echo " test - Run the test suite"
@echo " build - Create a test build or release package"
@echo " clean - Clean up generated files and directories"
@echo " firefox - Switch manifest.json to the Firefox manifest"
@echo " chrome - Switch manifest.json to the Chrome manifest"
@echo " help - Show this help message"
# Start the Python test server for testing
test-server:
@echo "Starting SHIFT code test server..."
@if [ ! -f test/test-server.py ]; then \
echo "Error: test/test-server.py not found"; \
exit 1; \
fi
@cd test && python3 test-server.py
# Run tests
test:
@npm install
@npm test test/shift-handler.test.js
# Build artifacts via interactive prompt
build:
@python3 scripts/release.py
# Clean up generated files
clean:
@echo "Cleaning up generated files..."
@rm -rf dist/
@echo "✅ Cleanup complete"
# Switch manifest.json to the desired browser flavor
firefox:
@cp manifest.firefox.json manifest.json
@echo "✅ manifest.json set to Firefox"
chrome:
@cp manifest.chrome.json manifest.json
@echo "✅ manifest.json set to Chrome"
# Development shortcuts
dev: test-server
# Production shortcuts
prod: clean build