From 91c8f0886b059fdd8a9edaa3aae0edd2061b411c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 8 May 2022 00:32:20 +0200 Subject: [PATCH] optionally rebuild plugins. --- build | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/build b/build index 6da83c33..16fb5d7f 100755 --- a/build +++ b/build @@ -1,12 +1,16 @@ #!/bin/bash -mkdir -p bin/plugins -rm bin/plugins/* 2>/dev/null - # # aborting if any command returns a non-zero value set -e +# +# do not build plugins when passing "core" as first argument +if [ "$1" = "core" ]; +then + skip_plugins="true" +fi + # # set git build variables if git exists if git version > /dev/null && [ -z $GIT_COMMIT ] && [ -z $GIT_COMMIT ]; @@ -31,6 +35,14 @@ go build \ " \ cmd/neko/main.go; +# +# if plugins are ignored +if [ "$skip_plugins" = "true" ]; +then + echo "Not building plugins..." + exit 0 +fi + # # if plugins directory does not exist if [ ! -d "./plugins" ]; @@ -39,6 +51,11 @@ then exit 0 fi +# +# ensure plugins folder exits and remove old plugins +mkdir -p bin/plugins +rm -f bin/plugins/* + # # build plugins for plugPath in ./plugins/*; do