Skip to content

Commit c44125a

Browse files
authored
Cache invalidation buster with hash in files. (#925)
1 parent e3e6898 commit c44125a

File tree

4 files changed

+11
-17
lines changed

4 files changed

+11
-17
lines changed

examples/cu_flight_controller/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ just bevy
123123
# Run the split BevyMon simulator in the browser
124124
just web
125125

126-
# Build a deployable browser bundle into dist/
126+
# Build a deployable browser bundle into dist/flight-controller with hashed asset filenames
127127
just web-dist
128128
```
129129

examples/cu_flight_controller/justfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ web:
5959
just prepare-assets
6060
trunk serve --open
6161

62-
# Build a static browser bundle into dist/ with stable filenames.
62+
# Build a static browser bundle into dist/flight-controller with hashed asset filenames.
6363
web-dist:
6464
#!/usr/bin/env bash
6565
set -euo pipefail
@@ -69,12 +69,9 @@ web-dist:
6969
fi
7070
cd "{{invocation_directory()}}"
7171
just prepare-assets
72-
rm -rf dist
73-
trunk build --release --public-url ./ --filehash false --dist dist
74-
# Trunk 0.17 emits /./asset paths here; normalize them so the dist tree is
75-
# relocatable and can be served from any subdirectory.
76-
sed -i 's#/\./#./#g' dist/index.html
77-
echo "Static web bundle written to ${PWD}/dist"
72+
rm -rf dist/flight-controller
73+
trunk build --release --public-url ./ --dist dist/flight-controller
74+
echo "Static web bundle written to ${PWD}/dist/flight-controller"
7875

7976
# Extract CopperLists from a log file (JSON export).
8077
logreader log="logs/flight_controller_sim.copper":

examples/cu_rp_balancebot/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $ cd examples/cu_rp_balancebot
4242
$ just web-dist
4343
```
4444

45-
This writes a relocatable static Trunk bundle into `dist/` with stable filenames.
45+
This writes a relocatable static Trunk bundle into `dist/balancebot/` with hashed asset filenames.
4646

4747
## To run the resimulation
4848

@@ -86,7 +86,7 @@ $ cargo run --bin balancebot-logreader --release
8686

8787
- `just bevy` — run the split-view Bevy sim with `cu_bevymon`.
8888
- `just web` — serve the split-view wasm demo with Trunk.
89-
- `just web-dist` — build a deployable static wasm bundle into `dist/`.
89+
- `just web-dist` — build a deployable static wasm bundle into `dist/balancebot/`.
9090
- `just balancebot-dump-text-logs` — extract human-readable logs from `logs/balance.copper` into `../../target/debug/cu29_log_index/strings.bin`.
9191
- `just balancebot-fsck` — integrity check of `logs/balance.copper`.
9292
- `just balancebot-set-pwm-permissions` — fix PWM sysfs permissions on the target (requires appropriate privileges).

examples/cu_rp_balancebot/justfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ web:
4848
just prepare-assets
4949
trunk serve --open
5050

51-
# Build a static browser bundle into dist/ with stable filenames.
51+
# Build a static browser bundle into dist/balancebot with hashed asset filenames.
5252
web-dist:
5353
#!/usr/bin/env bash
5454
set -euo pipefail
@@ -58,12 +58,9 @@ web-dist:
5858
fi
5959
cd "{{invocation_directory()}}"
6060
just prepare-assets
61-
rm -rf dist
62-
trunk build --release --public-url ./ --filehash false --dist dist
63-
# Trunk 0.17 emits /./asset paths here; normalize them so the dist tree is
64-
# relocatable and can be served from any subdirectory.
65-
sed -i 's#/\./#./#g' dist/index.html
66-
echo "Static web bundle written to ${PWD}/dist"
61+
rm -rf dist/balancebot
62+
trunk build --release --public-url ./ --dist dist/balancebot
63+
echo "Static web bundle written to ${PWD}/dist/balancebot"
6764

6865
# Extract a text log using the balancebot logreader.
6966
text-logs:

0 commit comments

Comments
 (0)