Makefile.toml
Rama main · réplica de lectura del repositorio original.
[config]
default_to_workspace = false
[env]
CONFIG = "./config"
DB="db.sqlite"
SLOW_QUERY_THRESHOLD_MS=700
JELLYFIN_WEB_TAG="v12.4"
DX_BIN = { value = "${HOME}/.cargo/bin/dx", condition = { env_not_set = ["DX_BIN"] } }
[tasks.db-prepare]
command = "cargo"
args = ["sqlx", "prepare"]
[tasks.test]
cwd = "crates/remux-server"
command = "cargo"
args = ["test", "--", "--nocapture"]
[tasks.jellyfin-web-ensure]
description = "Ensure jellyfin-web is built"
script = '''
CURRENT=""
if [ -d "jellyfin-web/.git" ]; then
CURRENT=$(git -C jellyfin-web describe --tags --exact-match 2>/dev/null || true)
fi
if [ ! -d "jellyfin-web/dist" ] || [ "$CURRENT" != "$JELLYFIN_WEB_TAG" ]; then
cargo make jellyfin-web
else
echo "jellyfin-web $JELLYFIN_WEB_TAG already built"
fi
'''
[tasks.dev]
dependencies = ["jellyfin-web-ensure"]
run_task = { name = ["dev-server", "dev-build-dash"], fork = true, parallel = true }
[tasks.dev-server]
command = "cargo"
args = ["run" , "-p", "remux-server"]
watch = { watch = ["${PWD}/crates"] }
#cwd = "crates/server"
[tasks.dev-serve-dash]
command = "${DX_BIN}"
args = ["serve", "--addr", "0.0.0.0", "--port", "8888"]
cwd = "crates/remux-dashboard"
[tasks.dev-build-dash]
command = "${DX_BIN}"
args = ["build", "--package", "remux-dashboard"]
cwd = "crates/remux-dashboard"
watch = {watch = ["${PWD}/crates/remux-dashboard/src", "${PWD}/crates/remux-dashboard/assets"]}
[tasks.build-desktop]
description = "Build the remux-desktop binary (system tray app for Windows/macOS/Linux)"
dependencies = ["build-desktop-dash", "jellyfin-web-ensure"]
command = "cargo"
args = ["build", "--release", "-p", "remux-desktop"]
[tasks.bundle-desktop]
description = "Build and bundle remux-desktop into a native app package (.app / .deb / .exe)"
dependencies = ["build-desktop-dash", "jellyfin-web-ensure"]
command = "cargo"
args = ["bundle", "--release", "-p", "remux-desktop"]
[tasks.build-desktop-dash]
description = "Build the dashboard WASM assets required by remux-desktop"
command = "${DX_BIN}"
args = ["build", "--release"]
cwd = "crates/remux-dashboard"
[tasks.build-docker]
dependencies = ["jellyfin-web-ensure"]
command = "docker"
args = ["buildx", "build", "--network", "host", "-f", "docker/Dockerfile", "-t", "ghcr.io/lostb1t/remux-server:local", "."]
[tasks.jellyfin-web-checkout]
description = "Clone jellyfin-web if not already present"
script = '''
if [ ! -d "jellyfin-web" ]; then
git clone --depth 1 --branch "$JELLYFIN_WEB_TAG" https://github.com/jellyfin/jellyfin-web.git jellyfin-web
else
cd jellyfin-web
CURRENT=$(git describe --tags --exact-match 2>/dev/null || git rev-parse --short HEAD)
if [ "$CURRENT" != "$JELLYFIN_WEB_TAG" ]; then
echo "Wrong version ($CURRENT), switching to $JELLYFIN_WEB_TAG"
git fetch --depth 1 origin tag "$JELLYFIN_WEB_TAG"
git checkout "$JELLYFIN_WEB_TAG"
else
echo "jellyfin-web $JELLYFIN_WEB_TAG already checked out"
fi
fi
'''
[tasks.jellyfin-web-build]
description = "Install deps and build jellyfin-web"
cwd = "jellyfin-web"
script = '''
npm install
npm run build:production
'''
[tasks.jellyfin-web]
description = "Checkout and build jellyfin-web"
dependencies = ["jellyfin-web-checkout", "jellyfin-web-build"]
[tasks.web-clients]
description = "Checkout/build all supported web clients"
dependencies = ["jellyfin-web"]
[tasks.dev-container]
command = "docker"
args = ["run", "--rm", "-it", "-p", "8080:8080", "-v", "${PWD}:/app", "-v", "target:/app/target", "remux-dev"]
dependencies = ["build-dev"]