github.com/whiteboxio/flow@v0.0.3-0.20190918184116-508d75d68a2c/docker/flowd-runner.sh (about) 1 set -e 2 3 FLOWD=./builds/flowd 4 PLUGIN_PATH="/go/src/flowd/plugins/" 5 6 build_plugin () { 7 plugin="${1}" 8 echo "Building plugin ${plugin}" 9 cd "${plugin}" 10 if test -f go.mod 11 then 12 go mod verify 13 fi 14 if test -d Gopkg.toml 15 then 16 dep ensure 17 fi 18 go build -buildmode=plugin 19 cd .. 20 } 21 22 if test -d ${PLUGIN_PATH} 23 then 24 oldpath=$(pwd) 25 cd "${PLUGIN_PATH}" 26 for p in $(ls -l .); do 27 if test -d $p 28 then 29 build_plugin "${p}" 30 fi 31 done 32 cd "${oldpath}" 33 fi 34 35 echo "Launching flowd" 36 dep ensure 37 ${FLOWD} -plugin.path="${PLUGIN_PATH}" $@