sources:
  # Get the chart version of the sub-charts published in application-collection
  # chart version
  milvus-chart-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/milvus | yq -r '.version'
  ollama-chart-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/ollama | yq -r '.version'
  open-webui-chart-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/open-webui | yq -r '.version'
  pytorch-chart-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/pytorch | yq -r '.version'
  vllm-chart-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/vllm | yq -r '.version'
  open-webui-mcpo-chart-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/open-webui-mcpo | yq -r '.version'

  # Get the app version of the sub-charts published in application-collection
  # app version
  milvus-app-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/milvus | yq -r '.appVersion'
  ollama-app-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/ollama | yq -r '.appVersion'
  open-webui-app-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/open-webui | yq -r '.appVersion'
  pytorch-app-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/pytorch | yq -r '.appVersion'
  vllm-app-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/vllm | yq -r '.appVersion'
  open-webui-mcpo-app-version:
    kind: shell
    spec:
      command: |
        helm show chart oci://dp.apps.rancher.io/charts/open-webui-mcpo | yq -r '.appVersion'


targets:
  # Ensure the index of the key corresponds to the order of dependencies in Chart.yaml
  update-chart-milvus:
    kind: yaml
    sourceid: milvus-chart-version
    spec:
      file: ./Chart.yaml
      key: $.dependencies[0].version
  update-chart-ollama:
    kind: yaml
    sourceid: ollama-chart-version
    spec:
      file: ./Chart.yaml
      key: $.dependencies[1].version
  update-chart-open-webui:
    kind: yaml
    sourceid: open-webui-chart-version
    spec:
      file: ./Chart.yaml
      key: $.dependencies[2].version
  update-chart-pytorch:
    kind: yaml
    sourceid: pytorch-chart-version
    spec:
      file: ./Chart.yaml
      key: $.dependencies[3].version
  update-chart-vllm:
    kind: yaml
    sourceid: vllm-chart-version
    spec:
      file: ./Chart.yaml
      key: $.dependencies[4].version
  update-chart-open-webui-mcpo:
    kind: yaml
    sourceid: open-webui-mcpo-chart-version
    spec:
      file: ./Chart.yaml
      key: $.dependencies[5].version
