Skip to content

Commit

Permalink
typo: gitTagToVersionNumberSetting (#222)
Browse files Browse the repository at this point in the history
fixes #221
  • Loading branch information
raboof authored Sep 7, 2024
1 parent b1df0b1 commit 7630ec9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ You can begin to use git to control your project versions.
The git plugin will now autogenerate your version using the following rules, in order:

1. Looks at version-property setting (default to `project.version`), and checks the `sys.props` to see if this has a value. If so, use it.
2. Otherwise, looks at the project tags. The first to match the `gitTagToVersionNumberSetting` is used to assign the version. The default is to look for tags that begin with `v` and a number, and use the number as the version. If there are multiple version tags, it will pick the highest.
2. Otherwise, looks at the project tags. The first to match the `gitTagToVersionNumber` setting is used to assign the version. The default is to look for tags that begin with `v` and a number, and use the number as the version. If there are multiple version tags, it will pick the highest.
3. If no tags are found either, look at the head commit. We attach this to the `git.baseVersion` setting: "<base-version>.<git commit sha>"
4. If no head commit is present either (which means this is a brand-new repository with no commits yet), we append the current timestamp to the base version: "<base-version>.<timestamp>".

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/github/sbt/git/GitPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ object SbtGit {
* Versioning runs through the following:
*
* 1. Looks at version-property settings, and checks the sys.props to see if this has a value.
* 2. Looks at the project tags. The first to match the `gitTagToVersionNumberSetting` is used to assign the version.
* 2. Looks at the project tags. The first to match the `gitTagToVersionNumber` setting is used to assign the version.
* 3. if we have a head commit, we attach this to the base version setting "<base-version>.<git commit sha>"
* 4. We append the current timestamp to the base version: "<base-version>.<timestamp>"
*/
Expand Down

0 comments on commit 7630ec9

Please sign in to comment.