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

Match Mavens version ordering when choosing the highes version #165

Open
Feuermurmel opened this issue Jan 23, 2019 · 0 comments
Open

Match Mavens version ordering when choosing the highes version #165

Feuermurmel opened this issue Jan 23, 2019 · 0 comments

Comments

@Feuermurmel
Copy link

a9153c9 introduced an enhancement which will pick the "newest" version from tags if there are multiple tags on the same commit. Sadly, the algorithm deciding which version is the "newest" one does not implement the same logic used by Maven (See http://www.mojohaus.org/versions-maven-plugin/version-rules.html and http://maven.apache.org/ref/3.0.4/maven-artifact/xref/org/apache/maven/artifact/versioning/DefaultArtifactVersion.html). The following project demonstrates a situation in which the version which is chose is not the one which was intended:

$ cat project/plugins.sbt 
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
$ cat build.sbt 
enablePlugins(GitVersioning)
git.gitTagToVersionNumber := { Some(_).filter(_ matches "[0-9]+\\..*") }
$ git tag 1.0
$ git tag 1.0-alpha1

$ sbt version
[...]
[info] 1.0-alpha1

I'm suggesting to use the same logic implemented by Maven.

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

1 participant