Skip to content

Commit

Permalink
chore(manager/asdf): Add tool to autogenerate supported plugins in do…
Browse files Browse the repository at this point in the history
…cs (#18924)
  • Loading branch information
maennchen committed Nov 16, 2022
1 parent 576d4d8 commit 1515999
Show file tree
Hide file tree
Showing 6 changed files with 323 additions and 219 deletions.
7 changes: 5 additions & 2 deletions lib/modules/manager/asdf/extract.ts
Expand Up @@ -21,8 +21,11 @@ export function extractPackageFile(content: string): PackageFile | null {
const version = groups.version.trim();

const toolConfig = upgradeableTooling[depName];
const toolDefinition =
typeof toolConfig === 'function' ? toolConfig(version) : toolConfig;
const toolDefinition = toolConfig
? typeof toolConfig.config === 'function'
? toolConfig.config(version)
: toolConfig.config
: undefined;

if (toolDefinition) {
const dep: PackageDependency = {
Expand Down
6 changes: 3 additions & 3 deletions lib/modules/manager/asdf/index.spec.ts
Expand Up @@ -4,9 +4,9 @@ import { extractPackageFile, supportedDatasources } from '.';
describe('modules/manager/asdf/index', () => {
describe('supportedDatasources', () => {
const toolConfigs = [
...Object.values(upgradeableTooling).filter(
(config): config is StaticTooling => 'datasource' in config
),
...Object.values(upgradeableTooling)
.map((definition) => definition.config)
.filter((config): config is StaticTooling => 'datasource' in config),
...extractPackageFile(`java adoptopenjdk-16.0.0+36
java adoptopenjdk-jre-16.0.0+36
scala 2.0.0
Expand Down
40 changes: 2 additions & 38 deletions lib/modules/manager/asdf/readme.md
Expand Up @@ -3,44 +3,8 @@ Keeps the [asdf](https://asdf-vm.com/manage/configuration.html#tool-versions) `.
Because `asdf` supports versioning for many different tools, specific tool support must be added one-by-one.
The following tools are currently supported:

- [awscli](https://github.com/MetricMike/asdf-awscli)
- [bun](https://github.com/cometkim/asdf-bun)
- [cargo-make](https://github.com/kachick/asdf-cargo-make)
- [clojure](https://github.com/asdf-community/asdf-clojure)
- [crystal](https://github.com/asdf-community/asdf-crystal)
- [deno](https://github.com/asdf-community/asdf-deno)
- [direnv](https://github.com/asdf-community/asdf-direnv)
- [dprint](https://github.com/asdf-community/asdf-dprint)
- [elixir](https://github.com/asdf-vm/asdf-elixir)
- [elm](https://github.com/asdf-community/asdf-elm)
- [erlang](https://github.com/asdf-vm/asdf-erlang)
- [gauche](https://github.com/sakuro/asdf-gauche)
- [golang](https://github.com/kennyp/asdf-golang)
- [haskell](https://github.com/asdf-community/asdf-haskell)
- [helm](https://github.com/Antiarchitect/asdf-helm)
- [helmfile](https://github.com/feniix/asdf-helmfile)
- [hugo](https://github.com/NeoHsu/asdf-hugo)
- [idris](https://github.com/asdf-community/asdf-idris)
- [java](https://github.com/halcyon/asdf-java)
- [julia](https://github.com/rkyleg/asdf-julia)
- [just](https://github.com/olofvndrhr/asdf-just)
- [kotlin](https://github.com/asdf-community/asdf-kotlin)
- [kustomize](https://github.com/Banno/asdf-kustomize)
- [lua](https://github.com/Stratus3D/asdf-lua)
- [nim](https://github.com/asdf-community/asdf-nim)
- [nodejs](https://github.com/asdf-vm/asdf-nodejs)
- [ocaml](https://github.com/asdf-community/asdf-ocaml)
- [perl](https://github.com/ouest/asdf-perl)
- [php](https://github.com/asdf-community/asdf-php)
- [python](https://github.com/danhper/asdf-python)
- [ruby](https://github.com/asdf-vm/asdf-ruby)
- [rust](https://github.com/code-lever/asdf-rust)
- [scala](https://github.com/asdf-community/asdf-scala)
- [shellcheck](https://github.com/luizm/asdf-shellcheck)
- [shfmt](https://github.com/luizm/asdf-shfmt)
- [terraform](https://github.com/asdf-community/asdf-hashicorp)
- [trivy](https://github.com/zufardhiyaulhaq/asdf-trivy)
- [zig](https://github.com/cheetah/asdf-zig)
<!-- Autogenerate in https://github.com/renovatebot/renovate -->
<!-- Autogenerate end -->

<!-- prettier-ignore -->
!!! note
Expand Down

0 comments on commit 1515999

Please sign in to comment.