sbt / sbt-dynver

An sbt plugin to dynamically set your version from git
Apache License 2.0
298 stars 47 forks source link

Support peeking at remote history / tags? #261

Open cb-nezasa opened 1 year ago

cb-nezasa commented 1 year ago

For larger repos in resource constrained CI/CD environments, having to unshallow the history can be a show stopper.

At least for the mayor use-cases, it would however be possible to find the "closest" tag by peeking at the upstream history without a (deep) clone, as described in the top answer to this stackoverflow post: https://stackoverflow.com/questions/10649814/get-last-git-tag-from-a-remote-repo-without-cloning. The key idea is to leverage git ls-remote.

Are there any plans or ideas to support such an approach or is this considered out of scope for sbt-dynver?

SethTisue commented 1 year ago

I don't think it's come up before. If it were opt-in so that the default behavior of the plugin didn't change, then I can't think of any reason we shouldn't accept a PR on this.