github.com/verrazzano/verrazzano@v1.7.0/cluster-operator/hack/add-yml-header.sh (about)

     1  #!/bin/bash
     2  # Copyright (c) 2020, 2022, Oracle and/or its affiliates.
     3  # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     4  
     5  # Add YAML boilerplate to generated CRDs - kubebuilder currently does not seem to have a way to
     6  # add boilerplate headers to these - only to generated Go files
     7  
     8  set -o errexit
     9  set -o nounset
    10  set -o pipefail
    11  
    12  SCRIPT_DIR=$(cd $(dirname "$0"); pwd -P)
    13  YML_FILENAME=${SCRIPT_DIR}/../${1}
    14  go run ${SCRIPT_DIR}/../../tools/fix-copyright/copyright.go -useExistingUpdateYearFromHeader -extension .yaml ${YML_FILENAME}