skip plugin build if no go.plug.mod.

This commit is contained in:
Miroslav Šedivý 2022-05-08 00:22:45 +02:00
parent 52642dbeb6
commit 0e6b411988

9
build
View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
mkdir -p bin/plugins mkdir -p bin/plugins
rm bin/plugins/* rm bin/plugins/* 2>/dev/null
# #
# aborting if any command returns a non-zero value # aborting if any command returns a non-zero value
@ -46,6 +46,13 @@ for plugPath in ./plugins/*; do
echo "Building plugin: $plugPath" echo "Building plugin: $plugPath"
if [ ! -f "go.plug.mod" ];
then
echo "go.plug.mod not found, skipping..."
popd
continue
fi
# build plugin # build plugin
go build -modfile=go.plug.mod -buildmode=plugin -o "../../bin/plugins/${plugPath##*/}.so" go build -modfile=go.plug.mod -buildmode=plugin -o "../../bin/plugins/${plugPath##*/}.so"