Skip to content

Commit 09e7593

Browse files
authored
GoMFT: Fix release archive naming (#3483)
* Fix release archive naming * No uses curl to fetch release * typo * Update * Update
1 parent 121577c commit 09e7593

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ct/gomft.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function update_script() {
2828
msg_error "No ${APP} Installation Found!"
2929
exit
3030
fi
31-
RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 4, length($2)-5) }')
31+
RELEASE=$(curl -fsSL https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
3232
if ! dpkg -l | grep -q "^ii.*build-essential"; then
3333
$STD apt-get install -y build-essential
3434
fi
@@ -41,9 +41,9 @@ function update_script() {
4141
msg_info "Updating $APP to ${RELEASE}"
4242
rm -f /opt/gomft/gomft
4343
temp_file=$(mktemp)
44-
wget -q "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file
44+
curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v.${RELEASE}.tar.gz" -o $temp_file
4545
tar -xzf $temp_file
46-
cp -rf GoMFT-${RELEASE}/* /opt/gomft
46+
cp -rf GoMFT-v.${RELEASE}/* /opt/gomft
4747
cd /opt/gomft
4848
$STD go mod download
4949
$STD go install github.com/a-h/templ/cmd/templ@latest

install/gomft-install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ msg_ok "Setup Golang"
3434

3535
msg_info "Setup ${APPLICATION} (Patience)"
3636
temp_file=$(mktemp)
37-
RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 4, length($2)-5) }')
38-
wget -q "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file
37+
RELEASE=$(curl -fsSL https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
38+
curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v.${RELEASE}.tar.gz" -o $temp_file
3939
tar -xzf $temp_file
40-
mv GoMFT-${RELEASE}/ /opt/gomft
40+
mv GoMFT-v.${RELEASE}/ /opt/gomft
4141
cd /opt/gomft
4242
$STD go mod download
4343
$STD go install github.com/a-h/templ/cmd/templ@latest

0 commit comments

Comments
 (0)