Update ./hack/update.sh to add a "latest" package.
This is just a copy of the newest Kubernetes version, but as a plain package and not a submodule. Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
parent
fac571b51a
commit
3ce3403b95
@ -10,6 +10,15 @@ ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
|
|||||||
# Generate code.
|
# Generate code.
|
||||||
xargs -n 1 -P 8 "$ROOT/hack/lib/update-codegen.sh" < "${ROOT}/hack/lib/kube-versions.txt"
|
xargs -n 1 -P 8 "$ROOT/hack/lib/update-codegen.sh" < "${ROOT}/hack/lib/kube-versions.txt"
|
||||||
|
|
||||||
|
# Copy the latest version into a ./generated/latest directory so we can depend on it without nested modules.
|
||||||
|
LATEST_VERSION="$(head -1 < "${ROOT}/hack/lib/kube-versions.txt" | cut -d"." -f1-2)"
|
||||||
|
LATEST_ROOT="$ROOT/generated/latest"
|
||||||
|
rm -rf "$LATEST_ROOT"
|
||||||
|
cp -r "$ROOT/generated/$LATEST_VERSION/" "$LATEST_ROOT"
|
||||||
|
find "$LATEST_ROOT" \( -name "go.mod" -or -name "go.sum" -or -name "README.adoc" \) -delete
|
||||||
|
rm -r "$LATEST_ROOT/crds"
|
||||||
|
find "$LATEST_ROOT" -type f -print0 | xargs -0 sed -i '' -e "s|go.pinniped.dev/generated/$LATEST_VERSION|go.pinniped.dev/generated/latest|g"
|
||||||
|
|
||||||
# Copy each CRD yaml to the app which should cause it to be installed.
|
# Copy each CRD yaml to the app which should cause it to be installed.
|
||||||
cp "$ROOT"/generated/1.20/crds/*.supervisor.*.yaml "$ROOT/deploy/supervisor"
|
cp "$ROOT"/generated/1.20/crds/*.supervisor.*.yaml "$ROOT/deploy/supervisor"
|
||||||
cp "$ROOT"/generated/1.20/crds/*.concierge.*.yaml "$ROOT/deploy/concierge"
|
cp "$ROOT"/generated/1.20/crds/*.concierge.*.yaml "$ROOT/deploy/concierge"
|
||||||
|
Loading…
Reference in New Issue
Block a user