mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-07-04 13:23:01 +02:00
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:
parent
0a2d162eb0
commit
603b35cdd8
@ -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() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user