Add script to generate files after crd.yml.j2 changes

This commit is contained in:
Christian M. Adams
2021-06-09 11:06:23 -04:00
parent f1b1293f5f
commit a30f3f658e
2 changed files with 19 additions and 1 deletions

17
scripts/generate-files.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
## This script will auto-generate the templated files and bundle files
## after changes to CRD template files. Please use this instead of manually
## updating the managed yaml files.
##
## Example:
## TAG=0.10.0 ./generate-files.sh
TAG=${TAG:-''}
if [[ -z "$TAG" ]]; then
echo "Set your \$TAG variable to your registry server."
echo "export TAG=mytag"
exit 1
fi
ansible-playbook ansible/chain-operator-files.yml
operator-sdk generate bundle --operator-name awx-operator --version $TAG