-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjustfile
More file actions
71 lines (61 loc) · 2.15 KB
/
justfile
File metadata and controls
71 lines (61 loc) · 2.15 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
start:
./start.sh
fmt:
fama "./src/**/*.{ts,tsx}"
cd src-tauri && cargo fmt
test-frontend:
bun run test
test-rust:
just build-helper-dev
cd src-tauri && cargo test
test-all:
bun run test
just test-rust
# Build CLI sidecar (src-tauri/bins/2code-helper)
build-helper:
#!/usr/bin/env bash
set -euo pipefail
TARGET_TRIPLE="${TWOCODE_HELPER_TARGET:-$(rustc --print host-tuple)}"
BIN_SUFFIX=""
if [[ "${TARGET_TRIPLE}" == *windows* ]]; then
BIN_SUFFIX=".exe"
fi
TARGET_DIR="target/release"
cd src-tauri
if [[ "${TARGET_TRIPLE}" != "$(rustc --print host-tuple)" ]]; then
TARGET_DIR="target/${TARGET_TRIPLE}/release"
cargo build --release -p twocode-helper --target "${TARGET_TRIPLE}"
else
cargo build --release -p twocode-helper
fi
mkdir -p binaries
cp -f "${TARGET_DIR}/2code-helper${BIN_SUFFIX}" "binaries/2code-helper-${TARGET_TRIPLE}${BIN_SUFFIX}"
chmod +x "binaries/2code-helper-${TARGET_TRIPLE}${BIN_SUFFIX}"
# Build CLI sidecar in debug mode (src-tauri/bins/2code-helper)
build-helper-dev:
#!/usr/bin/env bash
set -euo pipefail
TARGET_TRIPLE="${TWOCODE_HELPER_TARGET:-$(rustc --print host-tuple)}"
BIN_SUFFIX=""
if [[ "${TARGET_TRIPLE}" == *windows* ]]; then
BIN_SUFFIX=".exe"
fi
TARGET_DIR="target/debug"
cd src-tauri
if [[ "${TARGET_TRIPLE}" != "$(rustc --print host-tuple)" ]]; then
TARGET_DIR="target/${TARGET_TRIPLE}/debug"
cargo build -p twocode-helper --target "${TARGET_TRIPLE}"
else
cargo build -p twocode-helper
fi
mkdir -p binaries
cp -f "${TARGET_DIR}/2code-helper${BIN_SUFFIX}" "binaries/2code-helper-${TARGET_TRIPLE}${BIN_SUFFIX}"
chmod +x "binaries/2code-helper-${TARGET_TRIPLE}${BIN_SUFFIX}"
coverage:
cd src-tauri && cargo llvm-cov --lib --tests --html --output-dir coverage/
coverage-summary:
cd src-tauri && cargo llvm-cov --lib --tests
tauri-smoke:
cd e2e-tests && bun run test
cloc:
cloc --include-lang="TypeScript,Rust,JavaScript,CSS" . --exclude-dir=node_modules,dist,target --fullpath --not-match-d='(src-tauri/target|src/generated|src/paraglide)'