Files
faunosteo/scripts/upload-sheet-assets.sh
T
bchanot 2c445063a4 feat(supabase): R5.5 upload-sheet-assets in Rust, R5.4 caps and FLOOR clarification
Core rules curation::upload (manifest, local destination, bytes through the SVG reader,
plan from observed state); binary upload-sheet-assets over ureq (handshake, no overwrite,
confirm after verify, bounded retries, key never printed); pnpm assets:upload repointed,
e2e:sheet-assets for the local stack. 4 MiB cap on changes.json and references.json.
FLOOR clarification for audit prose with its negative proof.
2026-10-23 21:15:22 +02:00

15 lines
828 B
Bash
Executable File

#!/usr/bin/env bash
# `pnpm assets:upload [--check] <seed folder>`: uploads the SVG drawings of a generated sheet
# seed folder to the private bucket `anatomical-sheet-assets` of the LOCAL Supabase stack
# (R5.5, docs/development/SUPABASE.md §3.1). The `upload-sheet-assets` binary of crates/core
# behind its `upload` feature, on the native toolchain (scripts/rust-env.sh); the first run
# compiles it (release profile). Reads SUPABASE_URL (a local address, no default) and
# SUPABASE_SERVICE_ROLE_KEY from the environment; a relative folder is typed from the folder
# pnpm was run in (INIT_CWD). Run it by hand: the service key is typed, never stored.
set -euo pipefail
cd "$(dirname "$0")/.."
. scripts/rust-env.sh
exec cargo run --release --locked -q -p faunosteo-core --features upload --bin upload-sheet-assets -- "$@"