-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
Add informers and listers for the advanced usages
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Assorted scripts for development | ||
|
||
This directory contains several scripts useful in the development process of Shipwright Build. | ||
|
||
- `build-logs.sh` Collect the log of specific BuildRun Pod in the cluster. | ||
- `generate-copyright.sh` Generate the Shipwright Copyright header for all required files. | ||
- `generate-fakes.sh` Use Go counterfeiter to generate fakes. | ||
- `install-counterfeiter.sh` Install the Go counterfeiter. | ||
- `install-kind.sh` Install the latest verified Kubernetes cluster by KinD. | ||
- `install-kubectl.sh` Install the kubectl command line. | ||
- `install-operator-sdk.sh` Install the verified oeprator-sdk command line. | ||
- `install-registry.sh` Install the local container registry in the KinD cluster. | ||
- `install-tekton.sh` Install the latest verified Tekton Pipeline release. | ||
- `release.sh` Creates a new release of Shipwright Build. | ||
- `update-codegen.sh` Updates auto-generated client libraries. | ||
- `verify-codegen.sh` Verifies that auto-generated client libraries are up-to-date. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
# Copyright The Shipwright Contributors | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
REPO_ROOT_DIR="$(git rev-parse --show-toplevel)" | ||
readonly REPO_ROOT_DIR | ||
readonly TMP_DIFFROOT="$(mktemp -d ${REPO_ROOT_DIR}/tmpdiffroot.XXXXXX)" | ||
|
||
cleanup() { | ||
rm -rf "${TMP_DIFFROOT}" | ||
} | ||
|
||
trap "cleanup" EXIT SIGINT | ||
|
||
cleanup | ||
|
||
# Save working tree state | ||
mkdir -p "${TMP_DIFFROOT}/pkg" | ||
cp -aR "${REPO_ROOT_DIR}/pkg" "${TMP_DIFFROOT}" | ||
|
||
mkdir -p "${TMP_DIFFROOT}/vendor" | ||
cp -aR "${REPO_ROOT_DIR}/vendor" "${TMP_DIFFROOT}" | ||
|
||
"${REPO_ROOT_DIR}/hack/update-codegen.sh" | ||
echo "Diffing ${REPO_ROOT_DIR} against freshly generated codegen" | ||
ret=0 | ||
diff -Naupr "${REPO_ROOT_DIR}/pkg" "${TMP_DIFFROOT}/pkg" || ret=1 | ||
diff -Naupr "${REPO_ROOT_DIR}/vendor" "${TMP_DIFFROOT}/vendor" || ret=1 | ||
|
||
# Restore working tree state | ||
rm -fr "${REPO_ROOT_DIR}/pkg" | ||
rm -fr "${REPO_ROOT_DIR}/vendor" | ||
cp -aR "${TMP_DIFFROOT}"/* "${REPO_ROOT_DIR}" | ||
|
||
if [[ $ret -eq 0 ]] | ||
then | ||
echo "${REPO_ROOT_DIR} up to date." | ||
else | ||
echo "${REPO_ROOT_DIR} is out of date. Please run hack/update-codegen.sh" | ||
exit 1 | ||
fi |
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.