File: rust.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 (39 lines) | stat: -rw-r--r-- 1,272 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
38
39
name: "Update Rust versions"

sources:
  rust_stable_version:
    kind: shell
    spec:
      shell: bash
      command: |
        set -eo pipefail
        # Check that we have latest stable.
        if rustup check | grep ^stable- | grep 'Update available'; then
            echo >&2 "Rust toolchain 'stable' is stale, please update it"
            exit 1
        fi
        stable_rust_version=$("$(rustup +stable which rustc)" --version | cut -d' ' -f2)
        echo "${stable_rust_version%.*}"
  debian_stable_rust_version:
    kind: shell
    spec:
      command: |
        build_tools/version-available-in-debian.sh stable rustc

targets:
  update_rust_stable:
    name: "Update Rust stable"
    sourceid: rust_stable_version
    kind: file
    spec:
      file: .github/actions/rust-toolchain/action.yml
      matchpattern: '\(stable\) echo \d+\.\d+ ;;.*'
      replacepattern: '(stable) echo {{ source "rust_stable_version" }} ;; # updatecli.d/rust.yml'
  update_msrv:
    name: "Update MSRV"
    sourceid: rust_stable_version
    kind: file
    spec:
      file: .github/actions/rust-toolchain/action.yml
      matchpattern: '\(msrv\)   echo \d+\.\d+ ;;.*'
      replacepattern: '(msrv)   echo {{ source "debian_stable_rust_version" }} ;; # updatecli.d/rust.yml'