Skip to content
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

Auto version bump does not work for git shallow clones #42

Open
mayurva opened this issue Jul 22, 2015 · 1 comment
Open

Auto version bump does not work for git shallow clones #42

mayurva opened this issue Jul 22, 2015 · 1 comment

Comments

@mayurva
Copy link

mayurva commented Jul 22, 2015

Hello,

We are experimenting with shallow git clones (depth=1) for our Jenkins builds. We discovered that the auto version bump fails for shallow clones since the commit corresponding to last git tag is not pulled in when cloned with depth=1. Note that we pull in all the tags (git fetch --tags) while cloning, so the tags are available in the local copy.

When we investigated further, we discovered that contained_in_current_branch? method returns false as the branch metadata for the given tag is not present in the shallow copy.

Can you please suggest some alternate ways to bump the version, so that we can still use thor-scmversion with shallow clones?

Thanks,
Mayur

@capoferro
Copy link
Contributor

I'd be happy with an alternate implementation of contained_in_current_branch?. The current implementation is not very fast for repos with 1000+ tags. If you find a better way to figure out if a given tag is contained in the current branch, please send it our way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants