diff --git a/hack/checkCreatedAtAnnotation.sh b/hack/checkCreatedAtAnnotation.sh index 8eb54de4d..c17a4d165 100644 --- a/hack/checkCreatedAtAnnotation.sh +++ b/hack/checkCreatedAtAnnotation.sh @@ -14,12 +14,16 @@ # limitations under the License. changed_files=$(git status -s) -printf "${changed_files}" -printf "/n" +printf "$changed_files" +check_file=$(expr "$changed_files" == "M bundle/manifests/sonataflow-operator.clusterserviceversion.yaml") +echo "check_file" -if [[ "${changed_files}" = "M bundle/manifests/sonataflow-operator.clusterserviceversion.yaml" ]] ; then - printf "clusterserviceversion.yaml with createdAt /n" +if [[ "check_file" == "0" ]] ; then + printf "Cheking if the createdAt annotation has changed" + ##@TODO changed_files='' + diff=$(git diff bundle/manifests/sonataflow-operator.clusterserviceversion.yaml) + echo $diff else [[ -z "$changed_files" ]] || (printf "Generation has not been done on this PR. See modified files: \n$changed_files\n Did you run 'make generate-all' before sending the PR" && exit 1) fi \ No newline at end of file