mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-15 09:14:08 +00:00
Refactor GO_VERSION extraction in tor-snowflake.sh
Updated the method of extracting GO_VERSION from go.mod and set a default value if not found.
This commit is contained in:
committed by
GitHub
parent
9cab9ea9e9
commit
ab8a3c40d4
@@ -44,7 +44,8 @@ function update_script() {
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
CLEAN_INSTALL=1 GITLAB_URL="https://gitlab.torproject.org" fetch_and_deploy_gl_release "tor-snowflake" "tpo/anti-censorship/pluggable-transports/snowflake" "tarball"
|
||||
GO_VERSION="$(grep -m1 '^go ' /opt/tor-snowflake/proxy/go.mod | awk '{print $2}')" setup_go
|
||||
GO_VERSION="$(awk '/^go /{print $2; exit}' /opt/tor-snowflake/go.mod 2>/dev/null || true)"
|
||||
GO_VERSION="${GO_VERSION:-latest}" setup_go
|
||||
|
||||
msg_info "Building Snowflake"
|
||||
cd /opt/tor-snowflake/proxy
|
||||
|
||||
Reference in New Issue
Block a user