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 on lightweight and containing only major version tags #15

Merged
merged 1 commit into from
Oct 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/scala/sbtdynver/DynVerPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ final case class DynVer(wd: Option[File]) {
def hasNoTags(): Boolean = getGitDescribeOutput(new Date).hasNoTags

private[sbtdynver] def getGitDescribeOutput(d: Date) = {
val process = Process(s"""git describe --abbrev=8 --match v[0-9].* --always --dirty=+${timestamp(d)}""", wd)
val process = Process(s"""git describe --tags --abbrev=8 --match v[0-9]* --always --dirty=+${timestamp(d)}""", wd)
Try(process !! NoProcessLogger).toOption
.map(_.init)
.map(_.replaceAll("-([0-9]+)-g([0-9a-f]{8})", "+$1-$2"))
Expand Down