-
Notifications
You must be signed in to change notification settings - Fork 47
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
Including the branch name in the version? #51
Comments
Is there much demand for this support out the box? Without out the box support you can do this by customising the version string, as defined in https://github.com/dwijnand/sbt-dynver#custom-version-string. |
I think it's a pretty common use case, and standard in many build systems; it's could be included as part of build metadata with semver, at the end. More bringing it up a discussion point; it'd be nice to see the branch name in the metadata, but after thinking about it, it's not required for version uniqueness. |
I don't think it would be particularly useful to include this in the default version string, but it would be neat to offer a utility function to easily get the git branch for use in your custom version string |
A utility function leads to utility function variants, overloads, default params, etc. I'd rather not. Do something like scala> scala.util.Try(scala.sys.process.Process("git rev-parse --symbolic-full-name --abbrev-ref HEAD").!!).toOption.map(_.dropRight(1))
res0: Option[String] = Some(master) |
I had a similar need and I do not think the lib is missing anything. It's actually all there. Here is my very simplified auto-versioning.
btw. I am still using |
Any chance of a simple option to enable including branch names other than master in the version string?
The text was updated successfully, but these errors were encountered: