From 72663dd68cdb93fef11c141d238962424821c1a9 Mon Sep 17 00:00:00 2001 From: Brett Jia Date: Sun, 26 May 2024 15:51:02 -0400 Subject: [PATCH] installer: allow specifying exact server version to install (#1485) * Update install-scrypted-dependencies-mac.sh * Update install-scrypted-dependencies-linux.sh * Update install-scrypted-dependencies-win.ps1 * Update install-scrypted-dependencies-win.ps1 * Update install-scrypted-dependencies-win.ps1 * Update install-scrypted-dependencies-win.ps1 --- install/local/install-scrypted-dependencies-linux.sh | 2 +- install/local/install-scrypted-dependencies-mac.sh | 2 +- install/local/install-scrypted-dependencies-win.ps1 | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/install/local/install-scrypted-dependencies-linux.sh b/install/local/install-scrypted-dependencies-linux.sh index f8f06fdb5..68a801ad0 100755 --- a/install/local/install-scrypted-dependencies-linux.sh +++ b/install/local/install-scrypted-dependencies-linux.sh @@ -97,7 +97,7 @@ echo "docker compose rm -rf" sudo -u $SERVICE_USER docker rm -f /scrypted /scrypted-watchtower 2> /dev/null echo "Installing Scrypted..." -RUN sudo -u $SERVICE_USER npx -y scrypted@latest install-server +RUN sudo -u $SERVICE_USER npx -y scrypted@latest install-server $SCRYPTED_INSTALL_VERSION cat > /etc/systemd/system/scrypted.service < ~/Library/LaunchAgents/app.scrypted.server.plist < diff --git a/install/local/install-scrypted-dependencies-win.ps1 b/install/local/install-scrypted-dependencies-win.ps1 index 13266083d..cc31b86b5 100644 --- a/install/local/install-scrypted-dependencies-win.ps1 +++ b/install/local/install-scrypted-dependencies-win.ps1 @@ -26,7 +26,12 @@ $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" py $SCRYPTED_WINDOWS_PYTHON_VERSION -m pip install --upgrade pip py $SCRYPTED_WINDOWS_PYTHON_VERSION -m pip install debugpy typing_extensions typing opencv-python -npx -y scrypted@latest install-server +$SCRYPTED_INSTALL_VERSION=[System.Environment]::GetEnvironmentVariable("SCRYPTED_INSTALL_VERSION","User") +if ($SCRYPTED_INSTALL_VERSION -eq $null) { + npx -y scrypted@latest install-server +} else { + npx -y scrypted@latest install-server $SCRYPTED_INSTALL_VERSION +} $USER_HOME_ESCAPED = $env:USERPROFILE.replace('\', '\\') $SCRYPTED_HOME = $env:USERPROFILE + '\.scrypted'