Including Deno and curl-cffi which are now required for yt-dlp functionality. Installing both of these packages during upgrade.

This commit is contained in:
Roland 2026-02-16 08:08:46 -07:00
parent 3a9d3da3e9
commit adb8fefd67
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
4 changed files with 49 additions and 1 deletions

View file

@ -30,6 +30,14 @@ npm run build
# Install Node console commands.
npm i -g serve@12.0.1 single-file-cli@2.0.73 readability-extractor@0.0.6 carto@1.2.0
# Install Deno runtime.
DENO_VERSION="v2.2.4"
curl -fsSL "https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip" -o /tmp/deno.zip
unzip /tmp/deno.zip -d /usr/local/bin/
chmod +x /usr/local/bin/deno
rm /tmp/deno.zip
deno --version
# Install Python requirements. Try multiple times because pypi may stop responding.
python3 --version
python3 -m venv /opt/wrolpi/venv

View file

@ -27,6 +27,14 @@ sed -i 's/port =.*/port = 5432/' /etc/postgresql/15/main/postgresql.conf
# Install Node console commands.
npm i -g serve@12.0.1 single-file-cli@2.0.73 readability-extractor@0.0.6 carto@1.2.0
# Install Deno runtime.
DENO_VERSION="v2.2.4"
curl -fsSL "https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-aarch64-unknown-linux-gnu.zip" -o /tmp/deno.zip
unzip /tmp/deno.zip -d /usr/local/bin/
chmod +x /usr/local/bin/deno
rm /tmp/deno.zip
deno --version
# Put the latest WROLPi master in /opt/wrolpi.
git clone -b master https://github.com/lrnselfreliance/wrolpi.git /opt/wrolpi
git config --global --add safe.directory /opt/wrolpi

View file

@ -30,4 +30,4 @@ srt==3.5.3
tqdm==4.67.1
vininfo[cli]==1.8.0
webvtt-py==0.5.1
yt-dlp==2026.02.04
yt-dlp[default,curl-cffi]==2026.02.04

View file

@ -16,6 +16,38 @@ trap cleanup EXIT
cd /opt/wrolpi/app || exit 1
npm install || npm install || npm install || npm install # try install multiple times :(
# Install/upgrade Deno runtime.
upgrade_deno() {
DENO_VERSION="v2.2.4"
ARCH=$(uname -m)
if [ "$ARCH" = "aarch64" ]; then
DENO_ARCH="aarch64-unknown-linux-gnu"
elif [ "$ARCH" = "x86_64" ]; then
DENO_ARCH="x86_64-unknown-linux-gnu"
else
echo "Unsupported architecture for Deno: $ARCH"
return 1
fi
# Check if Deno is already installed at the correct version.
if command -v deno &> /dev/null; then
CURRENT_VERSION=$(deno --version | head -n1 | awk '{print "v"$2}')
if [ "$CURRENT_VERSION" = "$DENO_VERSION" ]; then
echo "Deno ${DENO_VERSION} already installed"
return 0
fi
fi
echo "Installing Deno ${DENO_VERSION} for ${ARCH}..."
curl -fsSL "https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-${DENO_ARCH}.zip" -o /tmp/deno.zip
unzip -o /tmp/deno.zip -d /usr/local/bin/
chmod +x /usr/local/bin/deno
rm /tmp/deno.zip
deno --version
}
upgrade_deno || echo "Deno upgrade failed, continuing..."
# Install any new Python requirements.
/opt/wrolpi/venv/bin/pip3 install --upgrade -r /opt/wrolpi/requirements.txt
# Upgrade the WROLPi database.