-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathjustfile
More file actions
72 lines (63 loc) · 2.28 KB
/
Copy pathjustfile
File metadata and controls
72 lines (63 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
set shell := ["sh", "-eu", "-c"]
default:
just --list
desktop *args:
cargo run -p codux -- {{args}}
server *args:
cargo run -p codux-server -- {{args}}
agent *args:
cargo run -p codux-agent -- {{args}}
mobile *args:
cd apps/mobile && \
set -- {{args}}; \
platform="${1:-android}"; \
case "$platform" in \
android|ios) shift || true ;; \
*) platform="" ;; \
esac; \
if [ -n "$platform" ]; then \
if [ "$platform" = "ios" ]; then \
./scripts/configure-ios-local-signing.sh; \
fi; \
device_id="$(flutter devices --machine | ruby -rjson -e 'platform = ARGV[0]; devices = JSON.parse(STDIN.read); device = devices.find { |item| item["isSupported"] && item["targetPlatform"].to_s.start_with?(platform) }; print(device ? device["id"] : "")' "$platform")"; \
if [ -n "$device_id" ]; then \
echo "Using $platform device: $device_id"; \
if [ "$platform" = "ios" ]; then \
mode="debug"; \
for arg in "$@"; do \
case "$arg" in \
--release) mode="release" ;; \
--profile) mode="profile" ;; \
--debug) mode="debug" ;; \
esac; \
done; \
if [ "$mode" = "debug" ]; then \
flutter build ios --debug; \
mkdir -p build/ios/iphoneos; \
rm -rf build/ios/iphoneos/Runner.app; \
cp -R build/ios/Debug-iphoneos/Runner.app build/ios/iphoneos/Runner.app; \
flutter run -d "$device_id" --no-build "$@"; \
else \
flutter run -d "$device_id" "$@"; \
fi; \
else \
flutter run -d "$device_id" "$@"; \
fi; \
else \
echo "No $platform device found. Falling back to flutter run."; \
flutter run "$@"; \
fi; \
else \
flutter run "$@"; \
fi
check:
cargo check --workspace
cd apps/mobile && flutter analyze
test:
cargo test --workspace
cd apps/mobile && flutter test
ffi:
cargo build -p codux-protocol-ffi
smoke:
cargo run -p codux-agent -- --pty-smoke
cargo run -p codux-agent -- --transport-smoke