-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (64 loc) · 2.28 KB
/
Copy pathMakefile
File metadata and controls
75 lines (64 loc) · 2.28 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
.PHONY: help setup install test clean example build deploy-test deploy-prod deploy-both check
help:
@echo "Excloud SDK - Simple Development Commands:"
@echo " setup - Create virtual environment and install dependencies"
@echo " install - Install package in development mode"
@echo " example - Run the example script"
@echo " test - Run tests"
@echo " clean - Clean build artifacts and virtual environment"
@echo ""
@echo "PyPI Deployment Commands:"
@echo " build - Build the package for distribution"
@echo " check - Check the built package"
@echo " deploy-test - Deploy to Test PyPI"
@echo " deploy-prod - Deploy to production PyPI"
@echo " deploy-both - Deploy to both Test PyPI and production PyPI"
setup:
@python3 setup_dev.py
install:
pip install -e .
example:
@if [ ! -f .venv/bin/python ]; then \
echo "❌ Virtual environment not found. Run 'make setup' first."; \
exit 1; \
fi
@if [ -z "$$EXCLOUD_API_KEY" ]; then \
echo "❌ EXCLOUD_API_KEY environment variable not set."; \
echo "💡 Set it with: export EXCLOUD_API_KEY=your_api_key"; \
exit 1; \
fi
@echo "🚀 Running example..."
.venv/bin/python example.py
test:
python -m pytest tests/ -v
clean:
@echo "🧹 Cleaning up..."
rm -rf build/ dist/ *.egg-info/
rm -rf .venv/
find . -name "*.pyc" -delete
find . -name "__pycache__" -type d -exec rm -rf {} +
@echo "✅ Clean complete!"
build:
@echo "🔨 Building package..."
python scripts/deploy.py --build-only --clean
check: build
@echo "✅ Package built and checked successfully!"
deploy-test:
@echo "🚀 Deploying to Test PyPI..."
python scripts/deploy.py --target test --clean
deploy-prod:
@echo "🚀 Deploying to production PyPI..."
@read -p "Are you sure you want to deploy to production PyPI? (y/N): " confirm; \
if [ "$$confirm" = "y" ] || [ "$$confirm" = "Y" ]; then \
python scripts/deploy.py --target prod --clean; \
else \
echo "❌ Deployment cancelled"; \
fi
deploy-both:
@echo "🚀 Deploying to both Test PyPI and production PyPI..."
@read -p "Are you sure you want to deploy to BOTH Test PyPI and production PyPI? (y/N): " confirm; \
if [ "$$confirm" = "y" ] || [ "$$confirm" = "Y" ]; then \
python scripts/deploy.py --target both --clean; \
else \
echo "❌ Deployment cancelled"; \
fi