Getting the basename of packageFile? #13791
Replies: 5 comments 6 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Are you just wanting to remove the file extension (in this case You could submit a PR for this (e.g. name: |
Beta Was this translation helpful? Give feedback.
-
Thanks @viceice @rarkins , Yes, I was trying out Yes, I am wanting to remove the file extension but also the folders leading up to the file. Like if my file structure was arbitrarily Thanks for the suggest, I'll try the |
Beta Was this translation helpful? Give feedback.
-
Hi @viceice @rarkins, following the replace documentation: https://docs.renovatebot.com/templates/#replace This fails (with the commas between arguments like in the documentation):
With error:
This works (sans commas):
Possibly a documentation mismatch. Going one step further, this also fails (I kinda didn't expect it to work because of the nested nature):
Because I wanted to replace both the |
Beta Was this translation helpful? Give feedback.
-
Based off this subcomment: #13791 (reply in thread) The solution ended up at:
|
Beta Was this translation helpful? Give feedback.
-
Not sure if it's possible to even do this, I'd like to use the basename of packageFile in the additionalBranchPrefix or commitMessagePrefix fields.
I'm using environments with helmfile and I have a values folder containing different helm chart versions for each environment.
Example values/dev.yaml:
And a renovate.json containing:
The branch it wants to create is
branch=renovate/releases/kubernetes-dashboard/values/dev.yaml-kubernetes-dashboard-5.x
. I see there is a parentDir field but I'd have to put each file in a dir of the same name likevalues/dev/dev.yaml
. Is there any way to get like the basename(packageFile) so that the branch would berenovate/releases/kubernetes-dashboard/dev-kubernetes-dashboard-5.x
?Beta Was this translation helpful? Give feedback.
All reactions