An sbt plugin to dynamically set your version from git
version
to make it compatible with ivy2/maven wildcard patternsPrior to this change, the first "dirty" version (i.e with local, uncommitted changes) after a tag had the form 1.0.0+20140707-1030
(tag version + timestamp), while the version on the first commit after a tag was 1.0.0+1-1234abcd
(tag version + commit distance + commit sha). This meant that a version specified like "1.0.0+" would select the older version over the newer one.
From version 3.0.0 onwards the first dirty version contains "+0" and the commit sha:
1.0.0+0-1234abcd-20140707-1030
.
Thank you @leonardehrenfried! But also @lokkju reporting the issue, and @raboof and @laughedelic for helping in the review.
dynverSonatypeSnapshots
(disabled by default) which appends "-SNAPSHOT" to the version if isSnapshot
is true
(it's only false when on a tag with no local changes). This opt-in makes it easier to use sbt-dynver when publishing to Sonatype snapshots. #53/#64 by @leonardehrenfried
Thanks again @leonardehrenfried.
https://github.com/dwijnand/sbt-dynver/compare/v2.1.0...v3.0.0
https://github.com/dwijnand/sbt-dynver/compare/v2.0.0...v2.1.0
isSnapshot
- now only tagged versions are not snapshotsPreviously, because sbt-dynver generates a unique, stable version for each commit from a
non-dirty repository, it set isSnapshot
to false
for this case. This made sense
since these versions are stable, immutable identifiers that can be relied upon, for example,
for caching, but did not correspond to the intuition of a 'snapshot' as an intermediate,
non-released version. From version 2.0.0 onwards, isSnapshot
will only be false for tagged
releases, and the key isVersionStable
can be used to determine whether the current version
is a stable identifier, as well as a migration aid to sbt-dynve 2.x. #23/#42 by @raboof