2020-08-07 00:30:18 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-07-07 19:35:20 +00:00
|
|
|
|
2020-09-16 14:05:51 +00:00
|
|
|
# Copyright 2020 the Pinniped contributors. All Rights Reserved.
|
2020-08-07 00:30:18 +00:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2020-08-25 01:07:34 +00:00
|
|
|
|
2020-08-07 00:30:18 +00:00
|
|
|
set -euo pipefail
|
2020-08-25 01:07:34 +00:00
|
|
|
|
2020-08-12 00:48:16 +00:00
|
|
|
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
|
2020-08-07 00:30:18 +00:00
|
|
|
|
2020-10-09 17:00:22 +00:00
|
|
|
# Generate code.
|
2020-08-24 19:09:35 +00:00
|
|
|
xargs "$ROOT/hack/lib/update-codegen.sh" < "${ROOT}/hack/lib/kube-versions.txt"
|
2020-10-09 17:00:22 +00:00
|
|
|
|
|
|
|
# Copy each CRD yaml to the app which should cause it to be installed.
|
|
|
|
cp "$ROOT"/generated/1.19/crds/*oidcproviderconfigs.yaml "$ROOT/deploy/supervisor"
|
|
|
|
cp "$ROOT"/generated/1.19/crds/*credentialissuerconfigs.yaml "$ROOT/deploy/concierge"
|
|
|
|
cp "$ROOT"/generated/1.19/crds/*webhookidentityproviders.yaml "$ROOT/deploy/concierge"
|
|
|
|
|
|
|
|
# Make sure we didn't miss any new CRDs.
|
|
|
|
crdCount=$(find "$ROOT"/generated/1.19/crds/ -maxdepth 1 -type f -name '*.yaml' | wc -l | tr -d ' ')
|
|
|
|
if [[ "$crdCount" != "3" ]]; then
|
|
|
|
echo "Looks like you added a new CRD. Please update this update.sh script to decide where to copy it and then run it again."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Tidy.
|
2020-08-07 00:30:18 +00:00
|
|
|
"$ROOT/hack/module.sh" tidy
|