-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile-bfte
More file actions
37 lines (30 loc) · 769 Bytes
/
justfile-bfte
File metadata and controls
37 lines (30 loc) · 769 Bytes
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
# run and restart on changes
[positional-arguments]
dev IDX="1" ARGS="run":
#!/usr/bin/env bash
set -euo pipefail
if [ ! -f Cargo.toml ]; then
cd {{invocation_directory()}}
fi
if [ -z "${BFTE_DEV_EPHEMERAL:-}" ] && [ -z "${BFTE_EPHEMERAL:-}" ] ; then
export BFTE_DATA_DIR="tmp/$1/"
else
export BFTE_EPHEMERAL=true
fi
if [ -z "${BFTE_DEV_NO_SECRET:-}" ]; then
export BFTE_SECRET_PATH="tmp/$1/secret"
fi
if [ -z "${BFTE_DEV_NO_FORCE_PASSWORD:-}" ]; then
export BFTE_FORCE_UI_PASSWORD="bfte"
fi
idx=$1
shift
port=$((6910 + $idx))
env \
BFTE_DEV_MODE=1 \
RUST_LOG=${RUST_LOG:-bfte=info,info,iroh=error,mainline=error} \
systemfd --no-pid -s http::[::1]:$port -- \
cargo watch \
-d ".1" \
-i 'tmp/**' \
-s "cargo run -- $@"