Skip to content

Commit

Permalink
chore: refine renovate config (#1747)
Browse files Browse the repository at this point in the history
  • Loading branch information
millotp authored Jul 13, 2023
1 parent cc8f511 commit 9ef4bae
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 20 deletions.
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/**",
"**/client-abtesting/**",
"**/client-analytics/**",
"**/client-insights/**",
"**/client_insights/**",
"**/client-personalization/**",
"**/client-query-suggestions/**",
"**/client-search/**",
"**/client_search/**",
"**/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
```

0 comments on commit 9ef4bae

Please sign in to comment.