From 7630ec90536c590e4b0cfa7ef24aaedbd4478a52 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sat, 7 Sep 2024 10:06:32 +0200 Subject: [PATCH] typo: `gitTagToVersionNumberSetting` (#222) fixes #221 --- README.md | 2 +- src/main/scala/com/github/sbt/git/GitPlugin.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d62edba..9bed22a 100644 --- a/README.md +++ b/README.md @@ -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>". diff --git a/src/main/scala/com/github/sbt/git/GitPlugin.scala b/src/main/scala/com/github/sbt/git/GitPlugin.scala index 690aff2..8e9c8a5 100644 --- a/src/main/scala/com/github/sbt/git/GitPlugin.scala +++ b/src/main/scala/com/github/sbt/git/GitPlugin.scala @@ -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 "." * 4. We append the current timestamp to the base version: "." */