Skip to content

Commit

Permalink
Support dynverSonatypeSnapshots in the dynver task (#90)
Browse files Browse the repository at this point in the history
This, in turn, makes dynverCheckVersion and dynverAssertVersion work.
  • Loading branch information
dwijnand committed Feb 20, 2019
1 parent fa0c86d commit 1a515d6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/scala/sbtdynver/DynVerPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ object DynVerPlugin extends AutoPlugin {
dynverSonatypeSnapshots := false,
dynverGitPreviousStableVersion := dynverInstance.value.getGitPreviousStableTag,

dynver := dynverInstance.value.version(new Date),
dynver := {
val dynver = dynverInstance.value
if (dynverSonatypeSnapshots.value) dynver.sonatypeVersion(new Date)
else dynver.version(new Date)
},
dynverCheckVersion := (dynver.value == version.value),
dynverAssertVersion := {
val v = version.value
Expand Down

0 comments on commit 1a515d6

Please sign in to comment.