From 09e7593734121a8a088b572d9c87308d876c3f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Sat, 29 Mar 2025 17:57:22 +0100 Subject: [PATCH] GoMFT: Fix release archive naming (#3483) * Fix release archive naming * No uses curl to fetch release * typo * Update * Update --- ct/gomft.sh | 6 +++--- install/gomft-install.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ct/gomft.sh b/ct/gomft.sh index d1931b7d7..0e05205b9 100644 --- a/ct/gomft.sh +++ b/ct/gomft.sh @@ -28,7 +28,7 @@ function update_script() { msg_error "No ${APP} Installation Found!" exit fi - RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 4, length($2)-5) }') + RELEASE=$(curl -fsSL https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') if ! dpkg -l | grep -q "^ii.*build-essential"; then $STD apt-get install -y build-essential fi @@ -41,9 +41,9 @@ function update_script() { msg_info "Updating $APP to ${RELEASE}" rm -f /opt/gomft/gomft temp_file=$(mktemp) - wget -q "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file + curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v.${RELEASE}.tar.gz" -o $temp_file tar -xzf $temp_file - cp -rf GoMFT-${RELEASE}/* /opt/gomft + cp -rf GoMFT-v.${RELEASE}/* /opt/gomft cd /opt/gomft $STD go mod download $STD go install github.com/a-h/templ/cmd/templ@latest diff --git a/install/gomft-install.sh b/install/gomft-install.sh index 0c6c5b093..6a130e134 100644 --- a/install/gomft-install.sh +++ b/install/gomft-install.sh @@ -34,10 +34,10 @@ msg_ok "Setup Golang" msg_info "Setup ${APPLICATION} (Patience)" temp_file=$(mktemp) -RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 4, length($2)-5) }') -wget -q "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file +RELEASE=$(curl -fsSL https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') +curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v.${RELEASE}.tar.gz" -o $temp_file tar -xzf $temp_file -mv GoMFT-${RELEASE}/ /opt/gomft +mv GoMFT-v.${RELEASE}/ /opt/gomft cd /opt/gomft $STD go mod download $STD go install github.com/a-h/templ/cmd/templ@latest