Commit 2a9456fc authored by Lisa's avatar Lisa

fix: add canonical node-agent release script and refresh installers

parent 587bf4ce
This diff is collapsed.
......@@ -294,7 +294,31 @@ cat > "$CONFIG_DIR/config.json" << EOF
"enable_camera_control": $ENABLE_CAMERA_CONTROL,
"permissions": {
"deny": ["sudo", "su", "doas", "dd if=", "mkfs", "fdisk", "wipe"],
"ask": ["rm -rf", "dd if=", "> /dev/", "chmod", "chown", "mv /", ":/usr/", ":/etc/", ":/bin/", ":/sbin/"],
"ask": [
"rm -rf",
"dd if=",
"> /dev/",
"chmod",
"chown",
"mv /",
":/usr/",
":/etc/",
":/bin/",
":/sbin/",
"> ~/.config/hermes-node/",
">> ~/.config/hermes-node/",
"tee ~/.config/hermes-node/",
"cp ~/.config/hermes-node/",
"mv ~/.config/hermes-node/",
"sed -i ~/.config/hermes-node/",
"> ~/.local/bin/",
">> ~/.local/bin/",
"tee ~/.local/bin/",
"cp ~/.local/bin/",
"mv ~/.local/bin/",
"chmod ~/.local/bin/",
"sed -i ~/.local/bin/"
],
"allow": []
}
}
......
#!/bin/bash
set -euo pipefail
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
MIRROR_DIR="/home/lisa/nexlab.net/files"
WEB_DIR="/home/web/lisa.nexlab.net/files"
RELEASE_DIR="$REPO_DIR/release"
BUNDLE_DIR="$RELEASE_DIR/bundle"
LINUX_WRAPPER_SRC="$REPO_DIR/deploy/linux/install-node.sh"
LINUX_WRAPPER_OUT="$BUNDLE_DIR/hermes-node-agent-installer.sh"
WINDOWS_INSTALLER=""
CHROME_EXTENSION=""
pick_first_existing() {
for p in "$@"; do
if [ -f "$p" ]; then
printf '%s\n' "$p"
return 0
fi
done
return 1
}
echo "=== Hermes Node Agent Release ==="
cd "$REPO_DIR"
./build-linux.sh
mkdir -p "$BUNDLE_DIR" "$MIRROR_DIR"
cp "$LINUX_WRAPPER_SRC" "$LINUX_WRAPPER_OUT"
WINDOWS_INSTALLER=$(pick_first_existing \
"$REPO_DIR/deploy/windows/hermes-node-agent-installer.exe" \
"$REPO_DIR/windows/dist/hermes-node-agent-installer.exe" \
"$REPO_DIR/release/hermes-node-agent-installer.exe")
CHROME_EXTENSION=$(pick_first_existing \
"$REPO_DIR/release/bundle/hermes-browser-agent-chrome-extension.zip" \
"$REPO_DIR/chrome-extension.zip" \
"$REPO_DIR/dist/hermes-node-chrome.zip")
if [ -z "$WINDOWS_INSTALLER" ]; then
echo "❌ Windows installer not found in expected locations"
exit 1
fi
if [ -z "$CHROME_EXTENSION" ]; then
echo "❌ Chrome extension zip not found in expected locations"
exit 1
fi
if [ "$WINDOWS_INSTALLER" != "$BUNDLE_DIR/hermes-node-agent-installer.exe" ]; then
cp "$WINDOWS_INSTALLER" "$BUNDLE_DIR/hermes-node-agent-installer.exe"
fi
if [ "$CHROME_EXTENSION" != "$BUNDLE_DIR/hermes-browser-agent-chrome-extension.zip" ]; then
cp "$CHROME_EXTENSION" "$BUNDLE_DIR/hermes-browser-agent-chrome-extension.zip"
fi
rm -f "$RELEASE_DIR/hermes-node-agent-bundle.zip"
(
cd "$BUNDLE_DIR"
zip -q -r ../hermes-node-agent-bundle.zip .
)
cp "$RELEASE_DIR/hermes-node-agent-bundle.zip" "$MIRROR_DIR/hermes-node-agent-bundle.zip"
cp "$LINUX_WRAPPER_OUT" "$MIRROR_DIR/hermes-node-agent-installer.sh"
sudo cp "$RELEASE_DIR/hermes-node-agent-bundle.zip" "$WEB_DIR/hermes-node-agent-bundle.zip"
sudo cp "$LINUX_WRAPPER_OUT" "$WEB_DIR/hermes-node-agent-installer.sh"
sudo chown www-data:www-data "$WEB_DIR/hermes-node-agent-bundle.zip" "$WEB_DIR/hermes-node-agent-installer.sh"
sudo chmod 644 "$WEB_DIR/hermes-node-agent-bundle.zip" "$WEB_DIR/hermes-node-agent-installer.sh"
echo "--- SHA256 parity ---"
sha256sum \
"$RELEASE_DIR/hermes-node-agent-bundle.zip" \
"$MIRROR_DIR/hermes-node-agent-bundle.zip" \
"$WEB_DIR/hermes-node-agent-bundle.zip"
printf '\n'
sha256sum \
"$LINUX_WRAPPER_OUT" \
"$MIRROR_DIR/hermes-node-agent-installer.sh" \
"$WEB_DIR/hermes-node-agent-installer.sh"
echo "--- Live download verification ---"
curl -fsSL https://lisa.nexlab.net/files/hermes-node-agent-bundle.zip -o /tmp/hermes-node-agent-bundle-live.zip
curl -fsSL https://lisa.nexlab.net/files/hermes-node-agent-installer.sh -o /tmp/hermes-node-agent-installer-live.sh
sha256sum /tmp/hermes-node-agent-bundle-live.zip /tmp/hermes-node-agent-installer-live.sh
curl -I -s https://lisa.nexlab.net/files/hermes-node-agent-bundle.zip | sed -n '1,5p'
echo "✅ Release complete"
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment