mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
add instructions into verify-featuregates script.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
This commit is contained in:
parent
b0d0a1557d
commit
a2bf91e9cf
@ -28,4 +28,7 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
|
|||||||
|
|
||||||
cd "${KUBE_ROOT}"
|
cd "${KUBE_ROOT}"
|
||||||
|
|
||||||
go run test/featuregates_linter/main.go feature-gates verify
|
if ! go run test/featuregates_linter/main.go feature-gates verify; then
|
||||||
|
echo "Please run 'hack/update-featuregates.sh' to update the feature list."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
@ -96,19 +96,23 @@ func NewUpdateFeatureListCommand() *cobra.Command {
|
|||||||
|
|
||||||
func verifyFeatureListFunc(cmd *cobra.Command, args []string) {
|
func verifyFeatureListFunc(cmd *cobra.Command, args []string) {
|
||||||
if err := verifyOrUpdateFeatureList(k8RootPath, unversionedFeatureListFile, false, false); err != nil {
|
if err := verifyOrUpdateFeatureList(k8RootPath, unversionedFeatureListFile, false, false); err != nil {
|
||||||
panic(err)
|
fmt.Fprintf(os.Stderr, "Failed to verify feature list: \n%s", err)
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
if err := verifyOrUpdateFeatureList(k8RootPath, versionedFeatureListFile, false, true); err != nil {
|
if err := verifyOrUpdateFeatureList(k8RootPath, versionedFeatureListFile, false, true); err != nil {
|
||||||
panic(err)
|
fmt.Fprintf(os.Stderr, "Failed to verify versioned feature list: \n%s", err)
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateFeatureListFunc(cmd *cobra.Command, args []string) {
|
func updateFeatureListFunc(cmd *cobra.Command, args []string) {
|
||||||
if err := verifyOrUpdateFeatureList(k8RootPath, unversionedFeatureListFile, true, false); err != nil {
|
if err := verifyOrUpdateFeatureList(k8RootPath, unversionedFeatureListFile, true, false); err != nil {
|
||||||
panic(err)
|
fmt.Fprintf(os.Stderr, "Failed to update feature list: \n%s", err)
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
if err := verifyOrUpdateFeatureList(k8RootPath, versionedFeatureListFile, true, true); err != nil {
|
if err := verifyOrUpdateFeatureList(k8RootPath, versionedFeatureListFile, true, true); err != nil {
|
||||||
panic(err)
|
fmt.Fprintf(os.Stderr, "Failed to update versioned feature list: \n%s", err)
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user