-
Notifications
You must be signed in to change notification settings - Fork 2.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Add tag after bumpVersion and automerge #2928
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? |
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. |
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. |
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. |
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. |
@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). |
@ScottRudiger thanks for checking that out. I guess the logic is like this?
|
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. |
I would love to see this. Any progress? Trying to get this for Pager :) |
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 |
A pity this proposal has found no implementors, I'd really enjoy it right now :) |
One concrete step would be to get the requirements fully agreed and described so that we can move it to |
@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: |
@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. |
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. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
The text was updated successfully, but these errors were encountered: