Skip to content

Serve Rust nightly versions for Renovate Custom Datasources

License

Notifications You must be signed in to change notification settings

phi-ag/renovate-rust-nightly

Repository files navigation

Renovate Rust Nightly

Worker

Parse nightly versions from rust-lang.github.io and serve the result in the required JSON format for Renovate Custom Datasources.

{
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
  "extends": [
    ":semanticCommits",
    "config:best-practices",
    "group:monorepos",
    "group:recommended"
  ],
  "customDatasources": {
    "rust-nightly": {
      "defaultRegistryUrlTemplate": "https://renovate-rust-nightly.phi-ag.workers.dev"
    }
  },
  "customManagers": [
    {
      "customType": "regex",
      "fileMatch": ["^rust-toolchain.toml$"],
      "matchStrings": ["channel = \"nightly-(?<currentValue>.+?)\"\\n"],
      "versioningTemplate": "regex:^(?<major>\\d{4})-(?<minor>\\d{2})-(?<patch>\\d{2})$",
      "datasourceTemplate": "custom.rust-nightly",
      "depNameTemplate": "rust-nightly"
    }
  ]
}