{{ if not .Values.olm.skipARTPackage }}
updates:
  # files are relative to art.yaml
  - file: "{MAJOR}.{MINOR}/meteringoperator.v{MAJOR}.{MINOR}.0.clusterserviceversion.yaml"
    update_list:
    # replace metadata.name value
    - search: "name: metering-operator.v{MAJOR}.{MINOR}.0"
      replace: "name: metering-operator.{FULL_VER}"
    # replace spec.version value
    - search: 'version: "{{ .Values.olm.csv.version }}"'
      replace: 'version: {FULL_VER}'
    - search: 'olm.skipRange: ">=4.2.0 <{MAJOR}.{MINOR}.0"'
      replace: 'olm.skipRange: ">=4.2.0 <{FULL_VER}"'
  - file: "metering.package.yaml"
    update_list:
    - search: "currentCSV: metering-operator.v{MAJOR}.{MINOR}.0"
      replace: "currentCSV: metering-operator.{FULL_VER}"
{{ end }}
