File: generate-matrix.sh

package info (click to toggle)
vorta 0.10.3-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,684 kB
  • sloc: python: 11,548; makefile: 89; xml: 63; sh: 51
file content (30 lines) | stat: -rw-r--r-- 947 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
event_name="$1"
branch_name="$2"

if [[ "$event_name" == "workflow_dispatch" ]] || [[ "$branch_name" == "master" ]]; then
    echo '{
      "python-version": ["3.9", "3.10", "3.11", "3.12"],
      "os": ["ubuntu-22.04", "macos-14"],
      "borg-version": ["1.4.0"]
    }' | jq -c . > matrix-unit.json

    echo '{
      "python-version": ["3.11"],
      "os": ["ubuntu-22.04"],
      "borg-version": ["1.1.18", "1.2.8", "1.4.0"],
      "exclude": [{"borg-version": "2.0.0b12", "python-version": "3.8"}]
    }' | jq -c . > matrix-integration.json

elif [[ "$event_name" == "push" ]] || [[ "$event_name" == "pull_request" ]]; then
    echo '{
      "python-version": ["3.9", "3.12"],
      "os": ["ubuntu-22.04", "macos-14"],
      "borg-version": ["1.2.8"]
    }' | jq -c . > matrix-unit.json

    echo '{
      "python-version": ["3.11"],
      "os": ["ubuntu-22.04"],
      "borg-version": ["1.4.0"]
    }' | jq -c . > matrix-integration.json
fi