diff --git a/src/main/scala/Vcs.scala b/src/main/scala/Vcs.scala index 26c5db6..19e949f 100644 --- a/src/main/scala/Vcs.scala +++ b/src/main/scala/Vcs.scala @@ -136,7 +136,12 @@ class Git(val baseDir: File) extends Vcs with GitLike { cmd("push", trackingRemote, "%s:%s" format (localBranch, trackingBranch)) } - private def pushTags = cmd("push", "--tags", trackingRemote) + private def pushTags = { + val lastTag = (cmd("for-each-ref", "--count=1", "--sort=-taggerdate", "--format", "%(tag)", "refs/tags") !!). + linesIterator.next() + cmd("push", trackingRemote, lastTag) + } + } object Subversion extends VcsCompanion { @@ -214,4 +219,4 @@ class Subversion(val baseDir: File) extends Vcs { private[sbtrelease] object Try { def apply[A](f: => A): Option[A] = scala.util.control.Exception.allCatch.opt(f) -} \ No newline at end of file +}