mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-05-04 03:43:07 +00:00
GoMFT: Fix build dependencies (#3313)
* Fix dependency * Fix dependency * Update install * Formatting
This commit is contained in:
parent
f7762da69c
commit
79e9fd911c
@ -42,8 +42,11 @@ function update_script() {
|
|||||||
cp -rf GoMFT-${RELEASE}/* /opt/gomft
|
cp -rf GoMFT-${RELEASE}/* /opt/gomft
|
||||||
cd /opt/gomft
|
cd /opt/gomft
|
||||||
$STD go mod download
|
$STD go mod download
|
||||||
$STD go build -o gomft
|
$STD go install github.com/a-h/templ/cmd/templ@latest
|
||||||
$STD $HOME/go/bin/templ generate
|
$STD $HOME/go/bin/templ generate
|
||||||
|
export CGO_ENABLED=1
|
||||||
|
export GOOS=linux
|
||||||
|
$STD go build -o gomft
|
||||||
chmod +x /opt/gomft/gomft
|
chmod +x /opt/gomft/gomft
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
msg_ok "Updated $APP to ${RELEASE}"
|
msg_ok "Updated $APP to ${RELEASE}"
|
||||||
|
@ -21,7 +21,8 @@ $STD apt-get install -y \
|
|||||||
sqlite3 \
|
sqlite3 \
|
||||||
rclone \
|
rclone \
|
||||||
tzdata \
|
tzdata \
|
||||||
ca-certificates
|
ca-certificates \
|
||||||
|
build-essential
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up Golang"
|
msg_info "Setting up Golang"
|
||||||
@ -34,7 +35,7 @@ ln -sf /usr/local/go/bin/go /usr/local/bin/go
|
|||||||
set -o pipefail
|
set -o pipefail
|
||||||
msg_ok "Setup Golang"
|
msg_ok "Setup Golang"
|
||||||
|
|
||||||
msg_info "Setup ${APPLICATION}"
|
msg_info "Setup ${APPLICATION} (Patience)"
|
||||||
temp_file=$(mktemp)
|
temp_file=$(mktemp)
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -s https://api.github.com/repos/StarFleetCPTN/GoMFT/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
wget -q "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file
|
wget -q "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file
|
||||||
@ -42,10 +43,12 @@ tar -xzf $temp_file
|
|||||||
mv GoMFT-${RELEASE}/ /opt/gomft
|
mv GoMFT-${RELEASE}/ /opt/gomft
|
||||||
cd /opt/gomft
|
cd /opt/gomft
|
||||||
$STD go mod download
|
$STD go mod download
|
||||||
$STD go build -o gomft
|
|
||||||
chmod +x gomft
|
|
||||||
$STD go install github.com/a-h/templ/cmd/templ@latest
|
$STD go install github.com/a-h/templ/cmd/templ@latest
|
||||||
$STD $HOME/go/bin/templ generate
|
$STD $HOME/go/bin/templ generate
|
||||||
|
export CGO_ENABLED=1
|
||||||
|
export GOOS=linux
|
||||||
|
$STD go build -o gomft
|
||||||
|
chmod +x /opt/gomft/gomft
|
||||||
JWT_SECRET_KEY=$(openssl rand -base64 24 | tr -d '/+=')
|
JWT_SECRET_KEY=$(openssl rand -base64 24 | tr -d '/+=')
|
||||||
|
|
||||||
cat <<EOF >/opt/gomft/.env
|
cat <<EOF >/opt/gomft/.env
|
||||||
|
Loading…
x
Reference in New Issue
Block a user