mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 10:30:59 +00:00
One plugin per dir.
This commit is contained in:
37
plugin/generateBuiltins.sh
Executable file
37
plugin/generateBuiltins.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script creates the generator and
|
||||
# transformer factory functions in
|
||||
# sigs.k8s.io/kustomize/plugin/builtin
|
||||
# by generating code based on the plugins
|
||||
# found below that directory.
|
||||
|
||||
set -e
|
||||
|
||||
myGoPath=$1
|
||||
if [ -z ${1+x} ]; then
|
||||
myGoPath=$GOPATH
|
||||
fi
|
||||
|
||||
if [ -z "$myGoPath" ]; then
|
||||
echo "Must specify a GOPATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dir=$myGoPath/src/sigs.k8s.io/kustomize
|
||||
|
||||
if [ ! -d "$dir" ]; then
|
||||
echo "$dir is not a directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Generating linkable plugins...
|
||||
|
||||
pushd $dir >& /dev/null
|
||||
|
||||
GOPATH=$myGoPath go generate \
|
||||
sigs.k8s.io/kustomize/plugin/builtin/...
|
||||
|
||||
popd >& /dev/null
|
||||
|
||||
echo All done.
|
||||
Reference in New Issue
Block a user