From 524ebde932920359c51cea47eb1fe3d366507235 Mon Sep 17 00:00:00 2001 From: "l.feng" <43399351+msclock@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:23:05 +0800 Subject: [PATCH] chore: add pin matches on renovate config (#71) Signed-off-by: l.feng <43399351+msclock@users.noreply.github.com> --- .renovaterc.json | 6 ++++-- template/.renovaterc.json.jinja | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.renovaterc.json b/.renovaterc.json index 71512d9..41c0e1d 100644 --- a/.renovaterc.json +++ b/.renovaterc.json @@ -32,7 +32,8 @@ ], "postUpgradeTasks": { "commands": [ - "find template -type f -exec sed -i -E 's/{{{replace \"/\" \"\\/\" depName}}}(.*)@{{{currentDigest}}} # {{{currentValue}}}/{{{replace \"/\" \"\\/\" depName}}}\\1@{{{newDigest}}} # {{{newValue}}}/g' {} +" + "find template -type f -exec sed -i 's|{{{depName}}}@{{{currentDigest}}} # {{{currentValue}}}|{{{depName}}}@{{{newDigest}}} # {{{newValue}}}|g' {} +", + "find template -type f -exec sed -i 's|{{{depName}}}@{{{currentValue}}}|{{{depName}}}@{{{newDigest}}} # {{{newValue}}}|g' {} +" ] } }, @@ -65,7 +66,8 @@ ], "postUpgradeTasks": { "commands": [ - "find template -type f -exec sed -i 's|{{{depName}}}:{{{currentValue}}}@{{{currentDigest}}}|{{{depName}}}:{{{newValue}}}@{{{newDigest}}}|g' {} +" + "find template -type f -exec sed -i 's|{{{depName}}}:{{{currentValue}}}@{{{currentDigest}}}$|{{{depName}}}:{{{newValue}}}@{{{newDigest}}}|g' {} +", + "find template -type f -exec sed -i 's|{{{depName}}}:{{{currentValue}}}$|{{{depName}}}:{{{newValue}}}@{{{newDigest}}}|g' {} +" ] } }, diff --git a/template/.renovaterc.json.jinja b/template/.renovaterc.json.jinja index b34ba93..41b6a2f 100644 --- a/template/.renovaterc.json.jinja +++ b/template/.renovaterc.json.jinja @@ -35,7 +35,8 @@ ], "postUpgradeTasks": { "commands": [ - "find template -type f -exec sed -i -E {{ '\'s/{{{replace \\"/\\" \\"\\\\/\\" depName}}}(.*)@{{{currentDigest}}} # {{{currentValue}}}/{{{replace \\"/\\" \\"\\\\/\\" depName}}}\\\\1@{{{newDigest}}} # {{{newValue}}}/g\' {} +' }}" + "find template -type f -exec sed -i {{ '\'s|{{{depName}}}@{{{currentDigest}}} # {{{currentValue}}}|{{{depName}}}@{{{newDigest}}} # {{{newValue}}}|g\' {} +' }}", + "find template -type f -exec sed -i {{ '\'s|{{{depName}}}@{{{currentValue}}}|{{{depName}}}@{{{newDigest}}} # {{{newValue}}}|g\' {} +' }}" ] } }, @@ -68,7 +69,8 @@ ], "postUpgradeTasks": { "commands": [ - "find template -type f -exec sed -i {{ '\'s|{{{depName}}}:{{{currentValue}}}@{{{currentDigest}}}|{{{depName}}}:{{{newValue}}}@{{{newDigest}}}|g\'' }} {} +" + "find template -type f -exec sed -i {{ '\'s|{{{depName}}}:{{{currentValue}}}@{{{currentDigest}}}$|{{{depName}}}:{{{newValue}}}@{{{newDigest}}}|g\' {} +' }}", + "find template -type f -exec sed -i {{ '\'s|{{{depName}}}:{{{currentValue}}}$|{{{depName}}}:{{{newValue}}}@{{{newDigest}}}|g\' {} +' }}" ] } },