File: python.yml

package info (click to toggle)
fish 4.2.1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 35,980 kB
  • sloc: python: 6,972; javascript: 1,407; sh: 1,009; xml: 411; ansic: 230; objc: 78; makefile: 20
file content (37 lines) | stat: -rw-r--r-- 1,102 bytes parent folder | download | duplicates (2)
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
31
32
33
34
35
36
37
name: "Update Python and Sphinx"

sources:
  python_version:
    kind: shell
    spec:
      command: |
        build_tools/version-available-in-debian.sh oldstable python3-defaults
  sphinx_version:
    kind: shell
    spec:
      shell: bash
      command: |
        set -eo pipefail
        tag=$(curl -fsS https://api.github.com/repos/sphinx-doc/sphinx/releases/latest |
          jq -r .tag_name)
        printf %s "$tag" | grep -qE '^v[0-9]+\.[0-9]\..*'
        version=${tag#v}
        echo "${version%.*}"

targets:
  update_python_version:
    name: "Update Python version"
    sourceid: python_version
    kind: file
    spec:
      file: pyproject.toml
      matchpattern: 'requires-python = ">=\d+.\d+".*'
      replacepattern: 'requires-python = ">={{ source "python_version" }}" # updatecli.d/python.yml'
  update_sphinx_version:
    name: "Update Sphinx version"
    sourceid: sphinx_version
    kind: file
    spec:
      file: pyproject.toml
      matchpattern: '"sphinx>=\d+\.\d+",(?:\s*#.*)?'
      replacepattern: '"sphinx>={{ source "sphinx_version" }}", # updatecli.d/python.yml'