Feature Request: Add tag after bumpVersion and automerge #22048
Replies: 18 comments
-
Right now Renovate combines all updates into a single commit. i.e. you won't see this:
Making it all into a single commit - including lock files if necessary - makes things very clean. Is changing that a pre-requisite the second part? |
Beta Was this translation helpful? Give feedback.
-
Sorry, since I just started using Renovate I've only seen one dependency get updated so far so I haven't seen multiple updates in one commit yet. I'll edit above to reflect that behavior. That's fine if the updated dependencies are in one commit (I agree it's clean). The main thing I'm concerned with is adding the tagged commit in the second part. |
Beta Was this translation helpful? Give feedback.
-
OK so the next points are:
I'm pretty sure you won't want us tagging branches, because the commits in branches can change (e.g. rebased upon conflict). I think what you want is for us to only tag after an automerge to master. If we were to tag, it would probably not be via git though - it would be via the API. |
Beta Was this translation helpful? Give feedback.
-
I think I only need the tag. I just know that For me, personally, I'd have to double-check with how CircleCI picks up tags to be sure. Thinking back, I believe it's based on a regex of the commit msg (maybe it needs to be separate).
Right you are; I'd like the tag to be on master after an automerge.
As long as CircleCI can detect that the tag was added to master, that works for me. 👍 I'll try to look into CircleCI's requirements and get back to you. |
Beta Was this translation helpful? Give feedback.
-
Please let me know what the process/logic is for CircleCI to detect tags and decide what to do. I think the builds are typically not triggered merely by a label addition so we may need to include it right away with Renovate's master commit. |
Beta Was this translation helpful? Give feedback.
-
FYI, @rarkins I posed the question to CircleCI 4 days ago without response yet (thread). If you have time, let me know if it covers what you need to know and I'll edit the question; or, feel free to respond if there's anything you'd like to add. |
Beta Was this translation helpful? Give feedback.
-
@rarkins I went ahead and tested creating a tag via GitHub's API and it actually triggered CircleCI's tag filter! So I think this will be a fairly simple matter. 👍 We can just do the following:
This worked for me when I simply added the tag to a previous commit via the API (CircleCI triggered with this test config and the tag showed up). |
Beta Was this translation helpful? Give feedback.
-
@ScottRudiger thanks for checking that out. I guess the logic is like this?
|
Beta Was this translation helpful? Give feedback.
-
That would work for me, but maybe some users would be surprised since tagging isn't really explicit in the names. It's up to you, but I was picturing something like Agreed on the last 2 points. |
Beta Was this translation helpful? Give feedback.
-
I would love to see this. Any progress? Trying to get this for Pager :) |
Beta Was this translation helpful? Give feedback.
-
Given the current list of higher priority features I want to implement, I don't expect this to be completed unless it's by an outside contribution. If anyone is interested in implementing it, let's make sure we lock down requirements here first and bump |
Beta Was this translation helpful? Give feedback.
-
A pity this proposal has found no implementors, I'd really enjoy it right now :) |
Beta Was this translation helpful? Give feedback.
-
One concrete step would be to get the requirements fully agreed and described so that we can move it to |
Beta Was this translation helpful? Give feedback.
-
@rarkins I think that we should have them summarized in the first comment, it is hard to rebuild them through the comment. Also, I'd propose to make the function more generic than proposed here, so that it can work with any project relying on tagging for versioning. This proposal would require a changes to
I think that Use case 3: Software library Foo depends on libraries Bar and Baz (depending on modules Baz-Core and Baz-Bazzy). The project is not written in Javascript, so it can't use This would be supported by the following configuration (exclusion is not required, but it is here for illustrative purposes): "bumpVersion": {
"versionFrom": "git_tags",
"generateTag": true,
"tagPrefix": "",
"bumpWhen": {
"matchPackageName": ["Bar"],
"excludePackagePatterns": ["^Baz.*"]
}
}
By the way, we might also need: |
Beta Was this translation helpful? Give feedback.
-
@DanySK this is really great. To help my and others' understanding, could you also summarize the various use cases which drive this implementation proposal? E.g. I can start with the original one:
I think originally in this feature request we were also adding:
What are the other ones - or subsets of those - which you're now adding? For example you're adding package names, but I'm not sure that's necessary because bumpVersion can be controlled by packageRules which themselves can have already limited the package names. |
Beta Was this translation helpful? Give feedback.
-
I think that Use case 3: Software library Foo depends on libraries Bar and Baz (depending on modules Baz-Core and Baz-Bazzy). The project is not written in Javascript, so it can't use This would be supported by the following configuration (exclusion is not required, but it is here for illustrative purposes): "bumpVersion": {
"version_from": "git_tags",
"generate_tag": true,
"tag_prefix": "",
"bump_when": [
{
"matchPackageName": ["Bar"],
"excludePackagePatterns": ["^Baz.*"]
}
]
}
By the way, we might also need: Note: I'm updating my previous comment too. |
Beta Was this translation helpful? Give feedback.
-
What would you like Renovate to be able to do?
When using
bumpVersion
I'd like Renovate to also be able to tag a commit aslatest
in the same way as if a human was running the commandnpm version patch
(or major/minor).In my case, specifically, I'd like Renovate to add the following commits to a single PR (assume starting version is 1.0.0):
Once all required status checks are green, auto merge (Renovate already does this).
Then, to get the tag on the master branch, run
git push upstream master --tags
(this triggers my ci to publish v1.0.1 to the npm registry).Describe the solution you'd like
For my use case, I'd like this to work with
"automergeType": "pr"
; however, it's up to the maintainers whether or not to include a solution for branches as well. Additionally, tagginglatest
in the same way asnpm version
is fine for me; however, a more versatile way of adding arbitrary tags may be desired by others.Describe alternatives you've considered
An alternative solution that works for me now is to manually run
npm version patch
, create/merge a PR, andnpm push upstream master --tags
after Renvoate has automerged dependency updates. It would be great if this could be automated.Additional context
My current Renovate config
Beta Was this translation helpful? Give feedback.
All reactions