mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
optionally rebuild plugins.
This commit is contained in:
parent
0e6b411988
commit
91c8f0886b
23
build
23
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
|
||||
|
Loading…
Reference in New Issue
Block a user