You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(migrations): drop migrate_altitude_to_bare_metres (#104)
The defensive converter in _config_sync_build_payload already runs every outbound ALTITUDE value through altitude_to_bare_metres on the wire, so suffixed disk values still emit a clean JSON number to the website regardless of the on-disk shape. The only population that would have benefited from the on-disk rewrite is a single dev-channel feeder, which does not justify the added migration-chain complexity. Removes the migrator, its bats coverage, and the configure-validators.sh source that update.sh only carried for the migrator's sake.
Addresses #101
echo"migrate_altitude_to_bare_metres: leaving ALTITUDE=\"$current\" untouched (does not parse as a metric/imperial altitude in [-1000, 10000] metres)">&2
415
-
return 0
416
-
fi
417
-
418
-
# Already bare — strict no-op (no write, no log spam). Without this
419
-
# short-circuit, the second-and-later migration runs would still
420
-
# rewrite the file (with identical contents) and bump mtime.
421
-
if [[ "$converted"=="$current" ]];then
422
-
return 0
423
-
fi
424
-
425
-
local tmp escaped
426
-
tmp="$(mktemp "${feed_env}.XXXXXX")"||return 0
427
-
# Escape exactly the way _apl_feed_apply_write does so a value the
428
-
# apply layer would re-emit verbatim survives this rewrite identically.
429
-
escaped="${converted//\\/\\\\}"
430
-
escaped="${escaped//\$/\\\$}"
431
-
escaped="${escaped//\`/\\\`}"
432
-
escaped="${escaped//\"/\\\"}"
433
-
# Replace the existing ALTITUDE line. `awk` so the replacement is
434
-
# exact-key-prefix (not a partial match like `ALTITUDE_FOO`) and
435
-
# respects per-line shape. First match wins (canonical case); later
436
-
# duplicate ALTITUDE lines (operator hand-edit oddity) are passed
437
-
# through so subsequent _apl_feed_apply_read can dedup them on its
0 commit comments