-
-
Notifications
You must be signed in to change notification settings - Fork 62
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] Option to disable bump commit creation #358
Comments
This seems to be closely related to #215 |
For now here is a hacky solution written in bash. It creates a bump with cocogitto and copies all tags from bump commit to current commit. The bump commit gets deleted. #!/bin/bash
set -euo pipefail
head="$(git rev-parse HEAD)"
cog bump --auto
bump_head="$(git rev-parse HEAD)"
if [[ "${head}" != "${bump_head}" ]]; then
readarray -t tags < <( git tag --points-at "${bump_head}" )
git reset --hard "${head}"
if [[ "${#tags[@]}" -gt 0 ]]; then
for tag in "${tags[@]}"; do
git tag -f "${tag}"
done
git push origin "${tags[@]}"
fi
fi |
Hey @quintagroup-m-kondratenko, thanks for the suggestion. |
@oknozor As of now I have zero experience with rust. Yet the change does not seem to be too complicated. I will give it a try as soon as I have time to do so. But I do not expect to have much success) |
Hey :) Still need some help for this feature ? I'll also have some time by the end of the week |
@ABWassim help is more than welcome :) |
@quintagroup-m-kondratenko since we disable the creation of the bump commit the Changelog and any file changed by the |
@ABWassim Leaving them as they are would provide the most options for the user to choose. |
Hey @quintagroup-m-kondratenko :) Just finished implementing this in #370. You can locally test it by checking out on the branch and use |
Hey, I just took a quick look and it seems good to me. I'll be away until the end of the week though. |
Thanks @oknozor ! I've also left a message on the discord channel about the failing GPG test if you want to have a quick look :) |
Thanks, I solved that on another pr already :) |
Nice :) Have a good week ;) |
Is your feature request related to a problem? Please describe.
There is no option to disable commit generation on bump. I need a tool that does tagging based on conventional commits, yet I specifically require it to not create any commits. Right now there is an option to disable changelog and I can leave all hooks empty, so no changes are actually made. Still the bump commit is created.
Describe the solution you'd like
The goal is to have current commit tagged with appropriate semver tags without creating an additional commit.
The best way in my opinion is to add a "bump_commit" (true by default) configuration option to the cog.toml file.
When false, changelog generation is disabled and all changes made by bump hooks are ignored. The tag is then placed on the current commit.
Describe alternatives you've considered
Right now I am using a patched version of semantic-release that allows tagging current commit despite it not being the latest https://github.com/agaudreault-jive/semantic-release.git#allow-outdated-head. This produces the required result, yet is far from being perfect. The patch is also not going to be accepted by the maintainers.
The text was updated successfully, but these errors were encountered: