Skip to content

Commit

Permalink
fix: use last tag instead of unstable value from dynver
Browse files Browse the repository at this point in the history
Motivation:
gatlingBumpVersion was throwing

Modifications:
 * Use dynverGitDescribeOutput

Result:
Correctly parse the last tag
  • Loading branch information
Isammoc committed Nov 5, 2023
1 parent 80ac0a1 commit d72a509
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ object GatlingVersioningPlugin extends AutoPlugin {
val bump = bumpParser.parsed
Def.task[String] {
implicit val clock: Clock = Clock.systemUTC()
val currentVersion = (ThisBuild / version).value
GatlingVersion(currentVersion)
val currentVersion = (ThisBuild / dynverGitDescribeOutput).value.map(_.ref.dropPrefix)
currentVersion.flatMap(GatlingVersion.apply)
.map(bump.bump)
.map(_.string)
.getOrElse(throw new IllegalStateException(s"Cannot bump unparsable version (got: '$currentVersion')"))
Expand Down

0 comments on commit d72a509

Please sign in to comment.