Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (53 loc) · 1.97 KB
/
Copy pathMakefile
File metadata and controls
64 lines (53 loc) · 1.97 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
.PHONY: help dev test build contract-deploy db-migrate db-reset clean dep-graph watch-contracts watch-contracts-docker
help:
@echo "Available targets:"
@echo " dev - Start Postgres, API, and Web dev servers concurrently"
@echo " test - Run npm and cargo tests"
@echo " build - Build npm workspaces and cargo workspace"
@echo " watch-contracts - Hot reload contract tests on file changes (cargo watch -x test)"
@echo " watch-contracts-docker - Same, fully dockerized (issue #1142, no local Rust needed)"
@echo " contract-deploy - Deploy the Soroban contract"
@echo " db-migrate - Run database migrations"
@echo " db-reset - Drop/recreate DB, run migrations, and seed data"
@echo " dep-graph - Generate dependency graph and update docs/dep-graph.svg"
@echo " clean - Remove node_modules and build artifacts"
dev:
npm run setup-env
docker compose up -d postgres
npm run dev
test:
npm run build
npm test
cd contracts && cargo test
build:
npm run build
cd contracts && cargo build --release --target wasm32-unknown-unknown
watch-contracts:
npm run watch:contracts
watch-contracts-docker:
docker-compose --profile contracts up contracts
contract-deploy:
soroban contract deploy \
--wasm contracts/target/wasm32-unknown-unknown/release/tariff_shield.wasm \
--rpc-url $${STELLAR_RPC_URL:-https://soroban-testnet.stellar.org} \
--network-passphrase "$${STELLAR_NETWORK_PASSPHRASE:-Test SDF Network ; September 2015}" \
--source $${PLATFORM_STELLAR_SECRET}
db-migrate:
docker compose up -d postgres
npm run migrate
db-reset:
docker compose down -v
docker compose up -d postgres
sleep 3
npm run migrate
npm run seed
dep-graph:
npm run dep-graph -- --format dot | dot -Tsvg -o docs/dep-graph.svg
@echo "Dependency graph updated: docs/dep-graph.svg"
clean:
rm -rf node_modules
rm -rf apps/*/node_modules
rm -rf packages/*/node_modules
cd contracts && cargo clean
rm -rf apps/*/dist
rm -rf packages/*/dist