ci-platforms / darwin amd64 smoke (push) Skipped
GitHub / linux amd64 native GitHub-hosted native CI: success
ci-platforms / windows amd64 smoke (push) Skipped
GitHub / windows amd64 native GitHub-hosted native CI: success
GitHub / darwin arm64 native GitHub-hosted native CI: success
GitHub / darwin amd64 native GitHub-hosted native CI: success
ci / checks (push) Failing after 1h21m34s
ci / native-authoring (push) Skipped
ci-platforms / darwin arm64 smoke (push) Skipped
github-native / gitea-pending (push) Skipped
github-native / darwin amd64 native (push) Skipped
github-native / linux amd64 native (push) Skipped
github-native / windows amd64 native (push) Skipped
github-native / darwin arm64 native (push) Skipped
github-native / gitea-result (push) Skipped
ci / build (amd64, linux, ubuntu-24.04) (push) Successful in 12m4s
ci / release (push) Skipped
Add dockable Art tools, animation and previews, guarded asset workflows, and the Web Asset Studio built on the shared Art Core. Expand English and Russian documentation, interactive Try scenes, examples and editor icons. Add audio waveform navigation, source analysis, guarded previews and a browser Worker mixer. Preserve source changes and recovery with bounded checks, and strengthen native, browser and interoperability CI. Prepare version 0.12.5 and manually built native artifact candidates. Fix the production site image demo build dependency. Reuse immutable scene indices when capturing keyframes. Wait for real Persist save/load completion in component tests. Stabilize browser Game View captures outside pointer hover. Aseprite interchange and persistent Audio EDL recovery remain limited; the artifact workflow does not publish releases or change stable.
69 lines
2.6 KiB
Bash
69 lines
2.6 KiB
Bash
#!/bin/sh
|
|
# Build the canonical platformer fresh; a failed export must not replace the last good site or leave stale artifacts.
|
|
set -eu
|
|
out=$1
|
|
shift
|
|
if [ -L "$out" ] || { [ -e "$out" ] && [ ! -d "$out" ]; }; then
|
|
echo "site-demo: output must be a directory, not a file or symlink: $out" >&2
|
|
exit 1
|
|
fi
|
|
parent=$(dirname "$out")
|
|
stage=$(mktemp -d "$parent/.site-demo.XXXXXX")
|
|
stage=$(cd "$stage" && pwd -P)
|
|
published=0
|
|
cleanup() {
|
|
if [ "$published" = 0 ] && { [ -e "$stage/previous" ] || [ -L "$stage/previous" ]; }; then
|
|
if [ ! -e "$out" ] && [ ! -L "$out" ]; then
|
|
mv "$stage/previous" "$out" || true
|
|
fi
|
|
if [ -e "$stage/previous" ] || [ -L "$stage/previous" ]; then
|
|
printf 'site-demo: previous output retained at %s\n' "$stage/previous" >&2
|
|
return
|
|
fi
|
|
fi
|
|
rm -rf "$stage"
|
|
}
|
|
trap cleanup 0
|
|
trap 'exit 1' HUP INT TERM
|
|
if [ "${1:-}" = --fix-checkpoint-gap ]; then
|
|
shift
|
|
cli=$1
|
|
verb=$2
|
|
project=$3
|
|
shift 3
|
|
[ "$verb" = export ] || { echo 'expected export command' >&2; exit 1; }
|
|
python3 -B tools/site_demo_prepare.py "$project" "$stage/project"
|
|
engine=$(pwd -P)
|
|
(cd "$stage" && GOWORK=off go work init "$engine" "$stage/project")
|
|
GOWORK="$stage/go.work" "$cli" "$verb" "$stage/project" "$@" --out "$stage/new"
|
|
else
|
|
"$@" --out "$stage/new"
|
|
fi
|
|
|
|
# Mute only the site's launcher; generate all representations from the final HTML, omit gzip name/time, and rename on the same filesystem.
|
|
page="$stage/new/index.html"
|
|
sed '/<html /{ /data-sound="off"/!s/<html lang="en"/<html lang="en" data-sound="off"/; }' "$page" > "$stage/index.html"
|
|
grep -q '<html .*data-sound="off"' "$stage/index.html"
|
|
gzip -n -9 -c "$stage/index.html" > "$stage/index.html.gz"
|
|
if [ -f "$page.br" ]; then
|
|
brotli -q 11 -c "$stage/index.html" > "$stage/index.html.br"
|
|
mv "$stage/index.html.br" "$page.br"
|
|
fi
|
|
mv "$stage/index.html.gz" "$page.gz"
|
|
mv "$stage/index.html" "$page"
|
|
# A marker detects mv nesting if the destination reappears during publication.
|
|
marker=$(mktemp "$stage/new/.aego-demo-publish.XXXXXXXX")
|
|
marker=${marker##*/}
|
|
if [ -L "$out" ] || { [ -e "$out" ] && [ ! -d "$out" ]; }; then
|
|
echo "site-demo: output changed to a file or symlink: $out" >&2
|
|
exit 1
|
|
fi
|
|
if [ -d "$out" ]; then
|
|
mv "$out" "$stage/previous"
|
|
fi
|
|
[ ! -e "$out" ] && [ ! -L "$out" ] || { echo "site-demo: output appeared during publication: $out" >&2; exit 1; }
|
|
mv "$stage/new" "$out"
|
|
[ -f "$out/$marker" ] && [ ! -L "$out/$marker" ] || { echo "site-demo: output changed during publication: $out" >&2; exit 1; }
|
|
rm "$out/$marker"
|
|
published=1
|