fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes Altmanningerupdatecli.d/rust.yml: fix staleness check when using rustup 1.29fdb1d9552

master
1.5 KiB47 linesraw
1name: "Update Rust versions"
2
3sources:
4  rust_stable_version:
5    kind: shell
6    spec:
7      shell: bash
8      command: |
9        set -e
10        # Check that we have latest stable.
11        if rustup check | grep '^stable-.*[uU]pdate available'; then
12            echo >&2 "Rust toolchain 'stable' is stale, please update it"
13            exit 1
14        fi
15        stable_rust_version=$("$(rustup +stable which rustc)" --version | cut -d' ' -f2)
16        echo "${stable_rust_version%.*}"
17  debian_stable_rust_version:
18    kind: shell
19    spec:
20      command: |
21        build_tools/version-available-in-debian.sh stable rustc
22
23targets:
24  update_rust_stable:
25    name: "Update Rust stable"
26    sourceid: rust_stable_version
27    kind: file
28    spec:
29      file: .github/actions/rust-toolchain/action.yml
30      matchpattern: '\(stable\) echo \d+\.\d+ ;;.*'
31      replacepattern: '(stable) echo {{ source "rust_stable_version" }} ;; # updatecli.d/rust.yml'
32  update_rust_stable2:
33    name: "Update Rust stable #2"
34    sourceid: rust_stable_version
35    kind: file
36    spec:
37      file: .github/workflows/lint-dependencies.yml
38      matchpattern: 'rust-version: \d+\.\d+\b.*'
39      replacepattern: 'rust-version: {{ source "rust_stable_version" }} # updatecli.d/rust.yml'
40  update_msrv:
41    name: "Update MSRV"
42    sourceid: rust_stable_version
43    kind: file
44    spec:
45      file: .github/actions/rust-toolchain/action.yml
46      matchpattern: '\(msrv\)   echo \d+\.\d+ ;;.*'
47      replacepattern: '(msrv)   echo {{ source "debian_stable_rust_version" }} ;; # updatecli.d/rust.yml'