From 0e6b4119885e78dfab19505f05abfe086a6abfc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 8 May 2022 00:22:45 +0200 Subject: [PATCH] skip plugin build if no go.plug.mod. --- build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build b/build index d69b8dd4..6da83c33 100755 --- a/build +++ b/build @@ -1,7 +1,7 @@ #!/bin/bash mkdir -p bin/plugins -rm bin/plugins/* +rm bin/plugins/* 2>/dev/null # # aborting if any command returns a non-zero value @@ -46,6 +46,13 @@ for plugPath in ./plugins/*; do echo "Building plugin: $plugPath" + if [ ! -f "go.plug.mod" ]; + then + echo "go.plug.mod not found, skipping..." + popd + continue + fi + # build plugin go build -modfile=go.plug.mod -buildmode=plugin -o "../../bin/plugins/${plugPath##*/}.so"