#148: keep the theme's master in the repository
SPACE_4.wav is the source the shipped theme is made from, so it belongs under version control - but not in the game. It lives in audio/masters/ with an empty .gdignore beside it, which makes Godot skip the folder outright: nothing in it is imported into res://, and nothing in it is carried into an export. Left where it was, in the project root, its 59MB would be imported and then packed into every Android and web build for a file nothing opens - the game loads audio/space_4.mp3, the same 5m36s at 6.7MB. Its .import file goes with it, since there is no longer anything to import, and the test runner stops copying the folder for the same reason it already skips android/ and builds/: 59MB copied on every single run, for a folder no test can even see. README.md next to it records which shipped file each master became and the command that made it, so the pair cannot drift apart silently.
This commit is contained in:
parent
940540d60c
commit
b8038c1f94
4 changed files with 22 additions and 1 deletions
0
audio/masters/.gdignore
Normal file
0
audio/masters/.gdignore
Normal file
18
audio/masters/README.md
Normal file
18
audio/masters/README.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Audio masters
|
||||
|
||||
The source files the shipped audio is made from. Versioned, but **not part of
|
||||
the game**: the empty `.gdignore` beside this file tells Godot to skip this
|
||||
folder entirely, so nothing here is imported into `res://` and nothing here
|
||||
is carried into an export.
|
||||
|
||||
That split is the point. `SPACE_4.wav` is 59MB of 16-bit stereo; the theme
|
||||
the game actually loads is `../space_4.mp3`, the same 5m36s at LAME 160k in
|
||||
6.7MB. Shipping the WAV as well would put 59MB into every Android and web
|
||||
build for a file nothing opens.
|
||||
|
||||
| master | shipped as | made with |
|
||||
| --- | --- | --- |
|
||||
| `SPACE_4.wav` | `../space_4.mp3` | `ffmpeg -i SPACE_4.wav -c:a libmp3lame -b:a 160k ../space_4.mp3` |
|
||||
|
||||
The sound effects have no master here - they are generated outright by
|
||||
`../make_sfx.py`, which is their source.
|
||||
BIN
audio/masters/SPACE_4.wav
Normal file
BIN
audio/masters/SPACE_4.wav
Normal file
Binary file not shown.
|
|
@ -173,9 +173,12 @@ if [[ "$IN_PLACE" != "1" ]]; then
|
|||
# keep being run.
|
||||
find "$run_dir" -mindepth 1 -maxdepth 1 ! -name '.godot' -exec rm -rf {} +
|
||||
# android/ and builds/ are export artefacts no test touches, and the .apk
|
||||
# is 30MB of nothing useful here.
|
||||
# is 30MB of nothing useful here. audio/masters/ is the same argument:
|
||||
# Godot skips it (.gdignore) so no test can reach it, and it is 59MB of
|
||||
# source WAV that would be copied on every single run.
|
||||
tar -C "$PROJECT_DIR" \
|
||||
--exclude=./.godot --exclude=./android --exclude=./builds --exclude='*.apk' \
|
||||
--exclude=./audio/masters \
|
||||
-cf - . 2>/dev/null | tar -C "$run_dir" -xf -
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue