From ff7bb25f2c68d19c70f88748fef068272a28b62b Mon Sep 17 00:00:00 2001 From: Pasha Sviderski Date: Wed, 9 Jul 2025 13:22:21 +1000 Subject: [PATCH] fix: custom version handling in install.sh script --- scripts/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index a3704b17..f1497580 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -7,6 +7,8 @@ INSTALL_SYSTEMD_DIR=${INSTALL_SYSTEMD_DIR:-/etc/systemd/system} UNCLOUD_GITHUB_URL="https://github.com/psviderski/uncloud" UNCLOUD_VERSION=${UNCLOUD_VERSION:-latest} +# Remove the 'v' prefix from the version if it exists. +UNCLOUD_VERSION=${UNCLOUD_VERSION#v} UNCLOUD_USER="uncloud" # Add the specified Linux user to group $UNCLOUD_USER to allow the user to run uncloud commands without sudo. UNCLOUD_GROUP_ADD_USER=${UNCLOUD_GROUP_ADD_USER:-} @@ -116,8 +118,8 @@ install_uncloud_binaries() { uncloudd_url="${UNCLOUD_GITHUB_URL}/releases/latest/download/uncloudd_linux_${file_arch}.tar.gz" uninstall_url="https://raw.githubusercontent.com/psviderski/uncloud/refs/heads/main/scripts/uninstall.sh" else - uncloudd_url="${UNCLOUD_GITHUB_URL}/releases/download/${UNCLOUD_VERSION}/uncloudd_linux_${file_arch}.tar.gz" - uninstall_url="https://raw.githubusercontent.com/psviderski/uncloud/refs/heads/${UNCLOUD_VERSION}/scripts/uninstall.sh" + uncloudd_url="${UNCLOUD_GITHUB_URL}/releases/download/v${UNCLOUD_VERSION}/uncloudd_linux_${file_arch}.tar.gz" + uninstall_url="https://raw.githubusercontent.com/psviderski/uncloud/refs/tags/v${UNCLOUD_VERSION}/scripts/uninstall.sh" fi local uncloudd_download_path="${tmp_dir}/uncloudd.tar.gz" local uninstall_download_path="${tmp_dir}/uninstall.sh"