-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjustfile
100 lines (76 loc) · 2.23 KB
/
justfile
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# xcode aliases
alias xc := xcode-clean
alias xr := xcode-reset
# watch aliases
alias wt := watch-test
alias wb := watch-build
# build aliases
alias bi := build-ios
alias bir := build-ios-release
alias bidd := build-ios-debug-device
default:
just --list
bacon:
cd rust && bacon clippy
bcheck:
cd rust && bacon check
check:
cd rust && cargo check
clean:
cd rust && cargo clean && \
rm -rf ios/Cove.xcframework && \
rm -rf ios/Cove && \
rm -rf rust/target
fmt:
cd rust && cargo fmt --all
swiftformat . --swiftversion 6 --exclude ios/Cove/Cove.swift
clippy *flags="":
cd rust && cargo clippy {{flags}}
update pkg="":
cd rust && cargo update {{pkg}}
xcode-clean:
rm -rf ~/Library/Caches/org.swift.swiftpm
cd ios && xcodebuild clean
ci:
just fmt
cd rust && cargo clippy --all-targets --all-features
just test
cd rust && cargo clippy --all-targets --all-features -- -D warnings
cd rust && cargo fmt --check
swiftformat --lint . --swiftversion 6 --exclude ios/Cove/Cove.swift
xcode-reset:
killAll Xcode || true
rm -rf ios/Cove.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
xcrun simctl --set previews delete all
rm -rf ~/Library/Caches/org.swift.swiftpm
rm -rf ~/Library/Developer/Xcode/DerivedData
cd ios && xcodebuild clean
cd ios && xcode-build-server config -project *.xcodeproj -scheme Cove
open ios/Cove.xcodeproj
build-android:
bash scripts/build-android.sh
run-android: build-android
bash scripts/run-android.sh
build-ios profile="debug" device="false" sign="false":
#!/usr/bin/env bash
if bash scripts/build-ios.sh {{profile}} {{device}} {{sign}}; then
say "done"
else
say "error"
fi
build-ios-release:
just build-ios release-smaller --device
build-ios-debug-device:
just build-ios debug --device
run-ios: build-ios
bash scripts/run-ios.sh
watch-build profile="debug" device="false":
watchexec --exts rs just build-ios {{profile}} {{device}}
test test="":
cd rust && cargo nextest run {{test}}
ctest test="":
cd rust && cargo test {{test}}
btest test="":
cd rust && bacon nextest -- {{test}}
watch-test test="":
watchexec --exts rs just test {{test}}