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