Creating a new file (and not adding it to git) results in a version without SNAPSHOT suffix.
uncommittedSignifier (SNAPSHOT,dirty, etc...) is not applied if the only change is the creation of new files. Without adding them to git, they are not considered uncommitted changes:
|
override def hasUncommittedChanges: Boolean = porcelain.status.call.hasUncommittedChanges |
from
hasUncommittedChanges documentation: "true if any
tracked file is changed"
Running a build in a directory containing non-tracked files should result in SNAPSHOT suffix (or at least it should be configurable). The sources used for such build do not match sources committed in the repository.
jgitver-maven-plugin uses !status.isClean(), rather than hasUncommitedChanges.
isClean considers untracked files.
Creating a new file (and not adding it to git) results in a version without SNAPSHOT suffix.
uncommittedSignifier(SNAPSHOT,dirty, etc...) is not applied if the only change is the creation of new files. Without adding them to git, they are not considered uncommitted changes:sbt-git/src/main/scala/com/typesafe/sbt/git/JGit.scala
Line 89 in 3dd1343
from
hasUncommittedChangesdocumentation: "true if any tracked file is changed"Running a build in a directory containing non-tracked files should result in SNAPSHOT suffix (or at least it should be configurable). The sources used for such build do not match sources committed in the repository.
gradle-android-git-version can be configured (untrackedIsDirty)
jgitver-maven-plugin with "dirty" marker enabled (using useDirty option) considers presence of untracked files a dirty state.
jgitver-maven-plugin uses
!status.isClean(), rather thanhasUncommitedChanges.isCleanconsiders untracked files.