mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
Replace the embedded SPA (go:embed + build tags) with runtime download from GitHub Releases. The binary no longer bundles UI assets — they are downloaded on first `skillshare ui` launch and cached at ~/.cache/skillshare/ui/<version>/. - Delete embed.go / embed_dev.go; add spa_disk.go with placeholder handler - Simplify ensureUIAvailable(): cache check before dev-mode fallback - Pre-download UI assets in `skillshare upgrade` (best-effort) - Remove Node stages from production and CI Dockerfiles - Keep Node stage in sandbox for playground UI cache pre-population - Remove ui-embed-check CI job and -tags dev build flag - Update Makefile, mise.toml, GoReleaser, release workflow
13 lines
448 B
Bash
Executable File
13 lines
448 B
Bash
Executable File
#!/bin/bash
|
|
# Docker entrypoint: populate UI cache from pre-built /ui-dist if available.
|
|
# This allows "skillshare ui" to serve the full React SPA in the playground
|
|
# even though the binary version is "dev" (no runtime download needed).
|
|
if [ -d /ui-dist ] && [ -n "$HOME" ]; then
|
|
cache_dir="$HOME/.cache/skillshare/ui/dev"
|
|
if [ ! -f "$cache_dir/index.html" ]; then
|
|
mkdir -p "$cache_dir"
|
|
cp -r /ui-dist/* "$cache_dir/"
|
|
fi
|
|
fi
|
|
exec "$@"
|