Renovate: bumpTag: Increment git tag after merge

Created on 13 Feb 2019  路  8Comments  路  Source: renovatebot/renovate

What would you like Renovate to be able to do?
We use https://gitversion.readthedocs.io/ for determine repository version. It looks in to latest git tag and then creates semver version based on it. It would be cool if renovate after merge of pr auto increment tag version on gitlab. Then our ci (teamcity) will create an artefact with new version.

Describe the solution you'd like
May be some new options in config. And logic based on gitlab api.

Describe alternatives you've considered
We can write an external bot, but it would be very dirty solution.

Additional context
No additional context.

priority-3-normal feature

Most helpful comment

So this is quite like the bumpVersion feature but for the repository tag instead of the package.json>version. eg. it could be called bumpTag. To get the current version we'd need to fetch all tags for the repository, filter and sort using semver, and then take the highest. This would not necessarily be the "last" or more recent tag added, but I suggest that it's the most pragmatic approach. Then based on the bumpTag configuration (patch, minor, major), we'd work out the new tag and apply it after automerge.

All 8 comments

Do you mean this is a case where Renovate is automerging? Or do you mean even after a human team member merges, you would like Renovate to do this tagging?

The first option.

So how would Renovate know the existing version, and how would it determine the new version?

Eg scan all commits until it finds a semver-compatible tag? And always patch increment it?

Last tag is the last version. Gitlab has an api for that https://docs.gitlab.com/ee/api/tags.html In our case all tags are valid semver versions. It could be customizable what part of version should be incremented.

So this is quite like the bumpVersion feature but for the repository tag instead of the package.json>version. eg. it could be called bumpTag. To get the current version we'd need to fetch all tags for the repository, filter and sort using semver, and then take the highest. This would not necessarily be the "last" or more recent tag added, but I suggest that it's the most pragmatic approach. Then based on the bumpTag configuration (patch, minor, major), we'd work out the new tag and apply it after automerge.

This would probably require a new platform.getTags() function added too.

Yes, you get this exactly right like I see it. I do not know could I get time to implement this feature. Right now we spin renovate in trial mode to determine could we adopt automated dependencies updates.

I wonder if using something like https://github.com/c4urself/bump2version to handle the git tagging may be useful.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Flydiverny picture Flydiverny  路  4Comments

rarkins picture rarkins  路  3Comments

zephraph picture zephraph  路  3Comments

Flydiverny picture Flydiverny  路  4Comments

OmgImAlexis picture OmgImAlexis  路  4Comments