Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Add yamlfmt (#930)
Browse files Browse the repository at this point in the history
* `make scaffold PLUGIN=yamlfmt`

* Intentionally specify old version of yamlfmt to test

* Fullfill the template

* `make merge`
  • Loading branch information
kachick committed May 28, 2023
1 parent d15f295 commit 99cc2a0
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci-tool-versions.yml
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
installable:
if: ${{ github.actor == 'renovate[bot]' }}
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand Down
7 changes: 7 additions & 0 deletions default.json
Expand Up @@ -250,6 +250,13 @@
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^v(?<version>\\S+)"
},
{
"fileMatch": ["\\.tool-versions$"],
"matchStrings": ["(^|\\n)yamlfmt (?<currentValue>\\S+)"],
"depNameTemplate": "google/yamlfmt",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^v(?<version>\\S+)"
},
{
"fileMatch": ["\\.tool-versions$"],
"matchStrings": ["(^|\\n)zig (?<currentValue>\\S+)"],
Expand Down
1 change: 1 addition & 0 deletions examples/.tool-versions
Expand Up @@ -34,4 +34,5 @@ shellcheck 0.9.0
shfmt 3.6.0
terraform 1.4.6
trivy 0.41.0
yamlfmt 0.4.0
zig 0.10.0
15 changes: 15 additions & 0 deletions plugins/yamlfmt.json5
@@ -0,0 +1,15 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"description": "Bump yamlfmt in .tool-versions",
"regexManagers": [
{
"fileMatch": ["\\.tool-versions$"],
"matchStrings": ["(^|\\n)yamlfmt (?<currentValue>\\S+)"],
// Plugin Fetcher Permalink: https://github.com/kachick/asdf-yamlfmt/blob/1f5ae4412dd879fcd4d9eeaae9ccd59c0f22721e/lib/utils.bash#L60
// DataSource URL: https://github.com/google/yamlfmt/releases
"depNameTemplate": "google/yamlfmt",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^v(?<version>\\S+)"
}
]
}
2 changes: 1 addition & 1 deletion renovate.json
Expand Up @@ -27,7 +27,7 @@
"matchPackagePrefixes": ["dprint"]
}
],
"labels": ["renovate", "dependencies", "ignore-this-label-just-for-trigger-renovate-34d839"],
"labels": ["renovate", "dependencies", "ignore-this-label-just-for-trigger-renovate-b5d5af"],
"ignorePaths": [
"**/node_modules/**",
"**/bower_components/**",
Expand Down
5 changes: 5 additions & 0 deletions test/examples.ts
Expand Up @@ -131,4 +131,9 @@ export const examples = [
source: 'v0.31.3',
extracted: '0.31.3',
},
{
plugin: 'yamlfmt',
source: 'v0.9.0',
extracted: '0.9.0',
},
] as const satisfies Readonly<Readonly<Example>[]>;

0 comments on commit 99cc2a0

Please sign in to comment.