screen-locker/stronglift_replacement/workout_app/tools/render_finish_chime.sh
Krzysztof kuhy Rudnicki 7264dcb1f7
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (flutter, flutter-analyze, ) (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (mypy, mypy, ) (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (pylint, pylint, ) (push) Waiting to run
pre-commit / pre-commit (${{ matrix.group }}) (rest, , mypy,pylint,flutter-analyze) (push) Waiting to run
Tests / test (push) Waiting to run
Tests / lock-popup-safety (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (0) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (1) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (2) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (3) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (4) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (5) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (6) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (7) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (8) (push) Waiting to run
Tests / flutter test (shard ${{ matrix.shard }}) (9) (push) Waiting to run
Tests / flutter-coverage (push) Blocked by required conditions
Tests / web-coverage (push) Waiting to run
release-apk / release (APK) (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
ci: fix pylint import and SC2155
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWXTUM9dpnCS2wtFkx4
2026-11-01 21:57:44 +01:00

35 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Render assets/sounds/workout_done.wav (the finish-workout chime) from
# render_finish_chime.py with the PINNED music_theory toolkit, and rebuild
# its MANIFEST.json (recipe, toolkit version, SHA-256) from scratch.
#
# The pin matters: a moving toolkit HEAD would silently change the sound the
# user listened to. Re-running must reproduce the shipped bytes.
#
# Usage: tools/render_finish_chime.sh [output_dir]
# Requires: python3 (with venv), network access to github.com.
set -euo pipefail
TOOLS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
readonly TOOLS_DIR
readonly TOOLKIT_SPEC="music_theory @ git+https://github.com/kuhyx/utils@music-theory-v0.1.0#subdirectory=music_theory"
readonly OUT_DIR="${1:-${TOOLS_DIR}/../assets/sounds}"
WORK_DIR=""
cleanup() {
if [[ -n "$WORK_DIR" && -d "$WORK_DIR" ]]; then
rm -rf "$WORK_DIR"
fi
}
trap cleanup EXIT
main() {
command -v python3 >/dev/null || { echo "Error: python3 is required" >&2; exit 1; }
WORK_DIR="$(mktemp -d)"
python3 -m venv "${WORK_DIR}/venv"
"${WORK_DIR}/venv/bin/pip" install --quiet "$TOOLKIT_SPEC"
"${WORK_DIR}/venv/bin/python" "${TOOLS_DIR}/render_finish_chime.py" "$OUT_DIR"
}
main "$@"