From fdea3ce4f13136143904ccb5be707567ce3a24f4 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Tue, 7 May 2024 22:52:04 +0900 Subject: [PATCH] fix: fix the support of devcontainer (#564) --- default.json | 17 ++++++++++++++--- jsonnet/default.jsonnet | 17 +++++++++++++++-- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/default.json b/default.json index 7c7a4a1..5c19738 100644 --- a/default.json +++ b/default.json @@ -7,9 +7,7 @@ "fileMatch": [ "^action\\.ya?ml$", "^\\.github/.*\\.ya?ml$", - "^\\.circleci/config\\.yml$", - "^\\.devcontainer\\.json$", - "^\\.devcontainer/devcontainer\\.json$" + "^\\.circleci/config\\.yml$" ], "matchStrings": [ " +(?:aqua_version|'aqua_version'|\"aqua_version\") *: +(?[^'\" \\n]+)", @@ -18,6 +16,19 @@ ], "versioningTemplate": "semver" }, + { + "customType": "regex", + "datasourceTemplate": "github-releases", + "depNameTemplate": "aquaproj/aqua", + "fileMatch": [ + "^\\.devcontainer\\.json$", + "^\\.devcontainer/devcontainer\\.json$" + ], + "matchStrings": [ + " +\"aqua_version\" *: +\"(?[^'\" \\n]+)\"" + ], + "versioningTemplate": "semver" + }, { "customType": "regex", "datasourceTemplate": "github-releases", diff --git a/jsonnet/default.jsonnet b/jsonnet/default.jsonnet index 28bba7b..e0d7dff 100644 --- a/jsonnet/default.jsonnet +++ b/jsonnet/default.jsonnet @@ -32,8 +32,6 @@ local utils = import 'utils.libsonnet'; '^action\\.ya?ml$', '^\\.github/.*\\.ya?ml$', '^\\.circleci/config\\.yml$', - '^\\.devcontainer\\.json$', - '^\\.devcontainer/devcontainer\\.json$', ], matchStrings: [ ' +%s *: +%s' % [utils.wrapQuote('aqua_version'), utils.currentValue], @@ -44,6 +42,21 @@ local utils = import 'utils.libsonnet'; depNameTemplate: 'aquaproj/aqua', datasourceTemplate: 'github-releases', }, + { + // Update aqua-installer action + customType: 'regex', + fileMatch: [ + '^\\.devcontainer\\.json$', + '^\\.devcontainer/devcontainer\\.json$', + ], + matchStrings: [ + // "aqua_version": "v2.27.0" + ' +"aqua_version" *: +"%s"' % [utils.currentValue], + ], + versioningTemplate: 'semver', // https://github.com/renovatebot/renovate/discussions/28150#discussioncomment-8925362 + depNameTemplate: 'aquaproj/aqua', + datasourceTemplate: 'github-releases', + }, utils.aquaRenovateConfigPreset { fileMatch: [ '^renovate\\.json5?$',