
Some checks failed
CI - 4NK_node / Code Quality (push) Failing after 38s
CI - 4NK_node / Unit Tests (push) Failing after 36s
CI - 4NK_node / Integration Tests (push) Successful in 33s
CI - 4NK_node / Security Tests (push) Failing after 33s
CI - 4NK_node / Docker Build & Test (push) Failing after 15s
CI - 4NK_node / Documentation Tests (push) Successful in 12s
CI - 4NK_node / Release Guard (push) Has been skipped
CI - 4NK_node / Performance Tests (push) Successful in 35s
CI - 4NK_node / Notify (push) Failing after 2s
34 lines
1.1 KiB
Bash
Executable File
34 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
echo "[build_ui] Build de ihm_client local et copie vers ./ihm_client/dist"
|
|
pushd ./ihm_client >/dev/null
|
|
if [ -f package-lock.json ]; then npm ci; else npm install; fi
|
|
# S'assurer des droits d'exécution et définir une URL par défaut pour le pkg
|
|
chmod +x ./scripts/setup-remote-deps.sh || true
|
|
export SDK_CLIENT_PKG_BASE="${SDK_CLIENT_PKG_BASE:-https://git.4nkweb.com/4nk/ihm_client/raw/branch/docker-support/pkg}"
|
|
./scripts/setup-remote-deps.sh || true
|
|
npm run build
|
|
popd >/dev/null
|
|
ls -l ./ihm_client/dist || { echo "[build_ui] dist manquant"; exit 1; }
|
|
# Créer un index.html minimal si absent (fallback SPA)
|
|
if [ ! -f ./ihm_client/dist/index.html ]; then
|
|
cat > ./ihm_client/dist/index.html <<'EOF'
|
|
<!doctype html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>4NK UI</title>
|
|
<link rel="stylesheet" href="/style.css" />
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script type="module" src="/index.js"></script>
|
|
</body>
|
|
</html>
|
|
EOF
|
|
fi
|
|
echo "[build_ui] OK"
|
|
|