Skip to content

Commit

Permalink
Allow setting RUST_LOG to any value in just all
Browse files Browse the repository at this point in the history
  • Loading branch information
Restioson committed Jul 26, 2023
1 parent c770ac8 commit b525cc3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ deps-ios:
cargo install cargo-lipo
rustup target add aarch64-apple-ios x86_64-apple-ios

# RUST_LOG is override here since FRB codegen panics if RUST_LOG isn't info or debug, which
# means a command like `RUST_LOG="warn" just all` would fail
gen:
#!/usr/bin/env bash
set -euxo pipefail
cd mobile
flutter pub get
flutter_rust_bridge_codegen \
RUST_LOG={{ if env_var("RUST_LOG") =~ "(?i)(trace)|(debug)" { "debug" } else { "info" } }} flutter_rust_bridge_codegen \
--rust-input native/src/api.rs \
--c-output ios/Runner/bridge_generated.h \
--extra-c-output-path macos/Runner/ \
Expand Down

0 comments on commit b525cc3

Please sign in to comment.