github.com/verrazzano/verrazzano@v1.7.1/ci/scripts/derive_operator_yaml.sh (about) 1 #!/usr/bin/env bash 2 3 # 4 # Copyright (c) 2022, Oracle and/or its affiliates. 5 # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 6 7 if [ -z "$1" ]; then 8 echo "Verrazzano release version is required" 9 exit 1 10 fi 11 VERSION=$1 12 13 # Remove prefix v from version 14 VERSION_NUM=${VERSION:1} 15 16 # Verrazzano distribution from 1.4.0 release replaces operator.yaml with verrazzano-platform-operator.yaml in release assets 17 VERSION_14=1.4.0 18 19 # Derive the file name 20 OPERATOR_YAML=$(echo ${VERSION_NUM} ${VERSION_14} | awk '{if ($1 < $2) print "operator.yaml"; else print "verrazzano-platform-operator.yaml"}') 21 22 # Derive yaml file 23 OPERATOR_YAML_FILE="https://github.com/verrazzano/verrazzano/releases/download/${VERSION}/${OPERATOR_YAML}" 24 25 echo $OPERATOR_YAML_FILE