-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (38 loc) · 1.1 KB
/
Makefile
File metadata and controls
46 lines (38 loc) · 1.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
# Makefile for Verso-Backend
.PHONY: dev db lint test package clean
# Default target
all: dev
# Run development server
dev:
@echo "Starting development server..."
.venv/bin/python run.py
# Initialize/Upgrade database
db:
@echo "Initializing/Upgrading database..."
export FLASK_APP=app && .venv/bin/flask db upgrade
export FLASK_APP=app && .venv/bin/flask create-roles
export FLASK_APP=app && .venv/bin/flask seed-business-config
# Lint code
lint:
@echo "Linting code..."
# Assuming flake8 is installed or will be installed
.venv/bin/pip install flake8
.venv/bin/flake8 app run.py
# Run tests
test:
@echo "Running tests..."
# Assuming pytest is installed or will be installed
.venv/bin/pip install pytest
.venv/bin/pytest
# Package application for offline handoff
package: clean
@echo "Packaging application..."
mkdir -p dist
zip -r dist/verso-backend.zip . -x "*.git*" -x "*.venv*" -x "__pycache__" -x "*.pyc" -x "dist*" -x "verso.sqlite" -x ".env"
@echo "Package created at dist/verso-backend.zip"
# Clean artifacts
clean:
@echo "Cleaning artifacts..."
rm -rf dist
rm -rf *.pyc
rm -rf __pycache__