-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c491d9
commit bdaff6b
Showing
22 changed files
with
126 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
VENDORED_CRD="vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-custom-resource-definition.yaml" | ||
LOCAL_CRD="manifests/00-custom-resource-definition.yaml" | ||
OUTDIR="${OUTDIR:-}" | ||
if [[ -z "$OUTDIR" ]]; then | ||
OUTDIR="$(mktemp -d)" | ||
fi | ||
function install_crd { | ||
local SRC="$1" | ||
local DST="$2" | ||
if ! diff -Naup "$SRC" "$DST"; then | ||
cp "$SRC" "$DST" | ||
echo "installed CRD: $SRC => $DST" | ||
fi | ||
} | ||
|
||
set -x | ||
GO111MODULE=on GOFLAGS=-mod=vendor go run sigs.k8s.io/controller-tools/cmd/controller-gen crd:trivialVersions=true paths=./pkg/api/v1 output:crd:dir="$OUTDIR" | ||
set +x | ||
# Can't rely on associative arrays for old Bash versions (e.g. OSX) | ||
install_crd \ | ||
"vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-custom-resource-definition.yaml" \ | ||
"manifests/00-custom-resource-definition.yaml" | ||
|
||
if [[ -z "${SKIP_COPY+1}" ]]; then | ||
cp "$OUTDIR/ingress.operator.openshift.io_dnsrecords.yaml" manifests/00-custom-resource-definition-internal.yaml | ||
if ! diff -Naup "$VENDORED_CRD" "$LOCAL_CRD"; then | ||
cp "$VENDORED_CRD" "$LOCAL_CRD" | ||
fi | ||
fi | ||
install_crd \ | ||
"vendor/github.com/openshift/api/operatoringress/v1/0000_50_dns-record.yaml" \ | ||
"manifests/00-custom-resource-definition-internal.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
TMP_DIR="$(mktemp -d)" | ||
VENDORED_CRD="vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-custom-resource-definition.yaml" | ||
LOCAL_CRD="manifests/00-custom-resource-definition.yaml" | ||
function verify_crd { | ||
local SRC="$1" | ||
local DST="$2" | ||
if ! diff -Naup "$SRC" "$DST"; then | ||
echo "invalid CRD: $SRC => $DST" | ||
fi | ||
} | ||
|
||
OUTDIR="$TMP_DIR" SKIP_COPY=true ./hack/update-generated-crd.sh | ||
verify_crd \ | ||
"vendor/github.com/openshift/api/operator/v1/0000_50_ingress-operator_00-custom-resource-definition.yaml" \ | ||
"manifests/00-custom-resource-definition.yaml" | ||
|
||
diff -Naup "$TMP_DIR/ingress.operator.openshift.io_dnsrecords.yaml" manifests/00-custom-resource-definition-internal.yaml | ||
diff -Naup "$VENDORED_CRD" "$LOCAL_CRD" | ||
verify_crd \ | ||
"vendor/github.com/openshift/api/operatoringress/v1/0000_50_dns-record.yaml" \ | ||
"manifests/00-custom-resource-definition-internal.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.