feat(horatio): cache app_build step in run.sh

Add caching to app_build so flutter build linux --release is skipped
when source files haven't changed. Hash includes both packages' Dart
files plus pubspec.yaml, pubspec.lock, and CMakeLists.txt.
This commit is contained in:
Krzysztof kuhy Rudnicki 2026-03-29 15:15:37 +02:00
parent 0a2d162eb0
commit 603b35cdd8

View File

@ -269,9 +269,16 @@ app_test() {
} }
app_build() { app_build() {
local h
h=$(cat <(files_hash "$CORE_DIR" -name '*.dart') <(files_hash "$APP_DIR" -name '*.dart' -o -name 'pubspec.yaml' -o -name 'pubspec.lock' -o -name 'CMakeLists.txt') | sha256sum | awk '{ print $1 }')
if step_cached app_build "$h"; then
echo " [cached] app_build — skipping"
return
fi
heading "Building horatio_app (Linux desktop)" heading "Building horatio_app (Linux desktop)"
cd "$APP_DIR" cd "$APP_DIR"
flutter build linux --release flutter build linux --release
cache_step app_build "$h"
} }
app_run() { app_run() {