Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refine renovate config #1747

Merged
merged 2 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/algoliasearch-client-java-2/.java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.0.18
11.0.19
58 changes: 40 additions & 18 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:js-app",
"algolia",
"github>algolia/renovate-config-algolia",
":preserveSemverRanges"
],
"enabledManagers": [
"dockerfile",
"github-actions",
"npm",
"nvm",
"gradle",
"composer",
"regex"
"regex",
"pub",
"gomod",
"gradle-wrapper"
],
"baseBranches": [
"chore/renovateBaseBranch"
Expand Down Expand Up @@ -84,6 +88,15 @@
"depNameTemplate": "yarnpkg/berry",
"datasourceTemplate": "github-releases"
},
{
"description": "Update yarn for netlify",
"fileMatch": "netlify.toml",
"matchStrings": [
"YARN_VERSION\\s*=\\s*\"(?<currentValue>.*?)\""
],
"depNameTemplate": "yarnpkg/berry",
"datasourceTemplate": "github-releases"
},
{
"description": "Update composer.json for PHP",
"fileMatch": "composer.mustache",
Expand All @@ -98,25 +111,18 @@
"description": "Update pubspec.yaml for Dart",
"fileMatch": "pubspec.mustache",
"matchStrings": [
"(dev_)?dependencies:\\s*{[^}]*}",
"\\s(?<depName>.*?):\\s*(?<currentValue>.*?)"
"(dev_)?dependencies:\\s*[^$]*",
" (?<depName>[a-z_]+?): (?<currentValue>.*?)\n"
],
"matchStringsStrategy": "recursive",
"datasourceTemplate": "dart"
},
{
"description": "Update libs.versions.toml for Kotlin",
"fileMatch": "libs.versions.toml",
"matchStrings": [
"(?<depName>.*?):.*?(?<currentValue>\\d+\\.\\d+\\.\\d+)"
],
"datasourceTemplate": "maven"
"datasourceTemplate": "dart",
"versioningTemplate": "npm"
},
{
"description": "Update .java-version",
"fileMatch": ".java-version",
"matchStrings": [
"(?<currentValue>.*?)"
"(?<currentValue>.*)"
],
"datasourceTemplate": "java-version",
"depNameTemplate": "java"
Expand All @@ -125,7 +131,7 @@
"description": "Update .dart-version",
"fileMatch": ".dart-version",
"matchStrings": [
"(?<currentValue>.*?)"
"(?<currentValue>.*)"
],
"datasourceTemplate": "dart-version",
"depNameTemplate": "dart"
Expand All @@ -134,28 +140,44 @@
"description": "Update .go-version",
"fileMatch": ".go-version",
"matchStrings": [
"(?<currentValue>.*?)"
"(?<currentValue>.*)"
],
"datasourceTemplate": "golang-version",
"depNameTemplate": "golang"
},
{
"description": "update Dockerfile",
"description": "Update .php-version",
"fileMatch": ".php-version",
"matchStrings": [
"(?<currentValue>.*)"
],
"datasourceTemplate": "github-tags",
"depNameTemplate": "php/php-src"
},
{
"description": "Update Dockerfile",
"fileMatch": "^Dockerfile$",
"matchStrings": [
"datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\sARG .*?_VERSION=(?<currentValue>.*)\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
}
],
"github-actions": {
"fileMatch": [
"\\.github/workflows/.*\\.ya?ml$"
]
},
"ignorePaths": [
"**/algoliasearch/**",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it allow negative patterns? maybe we can ignore everything in packages but the common ones

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately no it's only glob, not even regex, and the includePaths property doesn't work alongside it so we can't do like in generation.config.mjs

"**/client-abtesting/**",
"**/client-analytics/**",
"**/client-insights/**",
"**/client_insights/**",
"**/client-personalization/**",
"**/client-query-suggestions/**",
"**/client-search/**",
"**/client_search/**",
shortcuts marked this conversation as resolved.
Show resolved Hide resolved
"**/ingestion/**",
"**/predict/**",
"**/recommend/**",
Expand Down
2 changes: 1 addition & 1 deletion templates/dart/pubspec.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ dev_dependencies:
json_serializable: ^6.7.0
lints: ^2.1.1
logging: ^1.2.0
test: ^1.24.3
test: ^1.24.3
9 changes: 9 additions & 0 deletions website/docs/contributing/setup-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,12 @@ Java is not located in your PATH, either source the right `.bash_profile`, `.zsh
```bash
echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' > .bash_profile && source .bash_profile
```

### Running renovate locally

Running renovate on github can be tidious because it only works on the branch `main`, but you can run it locally with the CLI:
```sh
npm install -g renovate

LOG_LEVEL=debug renovate --dry-run --platform local
```