Skip to content

Commit

Permalink
Bugfix: Jellyseerr pnpm Version (#2033)
Browse files Browse the repository at this point in the history
* fix jellyseerr-install.sh pnpm version

* fix jellyseerr.sh pnpm version

* remove version from non-verbose output

---------

Co-authored-by: praging <gabrielpragin@gmail.com>
  • Loading branch information
vidonnus and praging authored Feb 5, 2025
1 parent 3a33e00 commit 7c2a682
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
22 changes: 14 additions & 8 deletions ct/jellyseerr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,23 @@ function update_script() {
msg_ok "Cleaning up"
fi

if ! command -v pnpm &> /dev/null; then
msg_error "pnpm not found. Installing..."
npm install -g pnpm &>/dev/null
cd /opt/jellyseerr
output=$(git pull --no-rebase)

pnpm_current=$(pnpm --version 2>/dev/null)
pnpm_desired=$(grep -Po '"pnpm":\s*"\K[^"]+' /opt/jellyseerr/package.json)

if [ -z "$pnpm_current" ]; then
msg_error "pnpm not found. Installing version $pnpm_desired..."
npm install -g pnpm@"$pnpm_desired" &>/dev/null
elif ! node -e "const semver = require('semver'); process.exit(semver.satisfies('$pnpm_current', '$pnpm_desired') ? 0 : 1)" ; then
msg_error "Updating pnpm from version $pnpm_current to $pnpm_desired..."
npm install -g pnpm@"$pnpm_desired" &>/dev/null
else
msg_ok "pnpm is already installed."
msg_ok "pnpm is already installed and satisfies version $pnpm_desired."
fi

msg_info "Updating $APP"
cd /opt/jellyseerr
output=$(git pull --no-rebase)

if echo "$output" | grep -q "Already up to date."; then
msg_ok "$APP is already up to date."
exit
Expand Down Expand Up @@ -102,4 +108,4 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5055${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5055${CL}"
12 changes: 7 additions & 5 deletions install/jellyseerr-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ $STD apt-get update
$STD apt-get install -y nodejs
msg_ok "Installed Node.js"

msg_info "Installing pnpm"
$STD npm install -g pnpm
msg_ok "Installed pnpm"

msg_info "Installing Jellyseerr (Patience)"
git clone -q https://github.com/Fallenbagel/jellyseerr.git /opt/jellyseerr
cd /opt/jellyseerr
$STD git checkout main

pnpm_desired=$(grep -Po '"pnpm":\s*"\K[^"]+' /opt/jellyseerr/package.json)
msg_info "Installing pnpm version $pnpm_desired..."
$STD npm install -g pnpm@$pnpm_desired
msg_ok "Installed pnpm"

msg_info "Installing Jellyseerr (Patience)"
export CYPRESS_INSTALL_BINARY=0
$STD pnpm install --frozen-lockfile
export NODE_OPTIONS="--max-old-space-size=3072"
Expand Down

0 comments on commit 7c2a682

Please # to comment.