Update versions of addons
[icn.git] / deploy / kubevirt-operator / kubevirt-operator.sh
1 #!/usr/bin/env bash
2 set -eEux -o pipefail
3
4 SCRIPTDIR="$(readlink -f $(dirname ${BASH_SOURCE[0]}))"
5 LIBDIR="$(dirname $(dirname ${SCRIPTDIR}))/env/lib"
6
7 source $LIBDIR/common.sh
8
9 function build_source {
10     mkdir -p ${SCRIPTDIR}/base
11     curl -sL https://github.com/kubevirt/kubevirt/releases/download/${KUBEVIRT_VERSION}/kubevirt-operator.yaml -o ${SCRIPTDIR}/base/kubevirt-operator.yaml
12     rm -f ${SCRIPTDIR}/base/kustomization.yaml
13     pushd ${SCRIPTDIR}/base && kustomize create --autodetect && popd
14 }
15
16 case $1 in
17     "build-source") build_source ;;
18     *) cat <<EOF
19 Usage: $(basename $0) COMMAND
20
21 Commands:
22   build-source  - Rebuild the in-tree YAML files
23 EOF
24        ;;
25 esac