download code from release instead of git repo

This commit is contained in:
KernelSailor
2025-12-26 19:37:59 +01:00
parent 2dd49e9b43
commit 85652adee9
2 changed files with 15 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: KernelSailor
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
@@ -24,14 +24,6 @@ function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/snowflake ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if ! id snowflake &>/dev/null; then
msg_error "snowflake user not found!"
exit
fi
msg_info "Updating Container OS"
$STD apt update
@@ -44,17 +36,18 @@ function update_script() {
systemctl stop snowflake-proxy
msg_ok "Stopped Service"
msg_info "Updating Go"
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
setup_go
msg_ok "Updated Go"
msg_info "Updating ${APP} to v${RELEASE}"
cd /opt/snowflake || exit
$STD git fetch --all
$STD git checkout "v${RELEASE}"
cd /opt
$STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o snowflake.tar.gz
$STD tar -xzf snowflake.tar.gz
rm -rf snowflake
mv "snowflake-v${RELEASE}" snowflake
rm snowflake.tar.gz
chown -R snowflake:snowflake /opt/snowflake
$STD sudo -u snowflake go build -o proxy ./proxy
cd /opt/snowflake/proxy
$STD sudo -u snowflake go build -o snowflake-proxy .
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to v${RELEASE}"