From 8130b833289ee95e9886d1b42070b4ba1d6fdac9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 24 Jun 2025 18:35:13 +0200 Subject: [PATCH] GoMFT: tmpl bugfix to work with current version until a new release pushed (#5435) --- ct/gomft.sh | 40 +++++++++++++++++++ .../json/{gomft.json.bak => gomft.json} | 0 install/gomft-install.sh | 38 ++++++++++++++++-- 3 files changed, 75 insertions(+), 3 deletions(-) rename frontend/public/json/{gomft.json.bak => gomft.json} (100%) diff --git a/ct/gomft.sh b/ct/gomft.sh index b16388217..365dbf7d3 100644 --- a/ct/gomft.sh +++ b/ct/gomft.sh @@ -45,6 +45,9 @@ function update_script() { msg_ok "Stopped $APP" msg_info "Updating $APP to ${RELEASE}" + if ! command -v git >/dev/null 2>&1; then + $STD apt-get install -y git + fi rm -f /opt/gomft/gomft temp_file=$(mktemp) curl -fsSL "https://github.com/StarFleetCPTN/GoMFT/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file" @@ -53,6 +56,43 @@ function update_script() { cd /opt/gomft $STD npm install $STD npm run build + TEMPL_VERSION="$(awk '/github.com\/a-h\/templ/{print $2}' go.mod)" + $STD go install github.com/a-h/templ/cmd/templ@${TEMPL_VERSION} + # dirty hack to fix templ + cat <<'EOF' >/opt/gomft/components/file_metadata/search/file_metadata_search_content.templ +package search + +import ( + "context" + "github.com/starfleetcptn/gomft/components/file_metadata" + "github.com/starfleetcptn/gomft/components/file_metadata/list" +) + +templ FileMetadataSearchContent(ctx context.Context, data file_metadata.FileMetadataSearchData) { + +
No files found matching your search criteria.
+No files found matching your search criteria.
+