Skip to content

Commit

Permalink
fix value of describe.tag.version placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
qoomon committed Nov 9, 2022
1 parent 68411b8 commit 38d73f0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Changelog

## 6.3.6

##### Fixes
- fix value of describe.tag.version placeholder


## 6.3.5

##### Fixes
- Improve compatibility with Gradle Configuration Cache #99


## 6.3.4

##### Fixes
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This plugin can virtually set project version and properties, based on current *

```groovy
plugins {
id 'me.qoomon.git-versioning' version '6.3.5'
id 'me.qoomon.git-versioning' version '6.3.6'
}
version = '0.0.0-SNAPSHOT'
Expand All @@ -41,7 +41,7 @@ gitVersioning.apply {

```kotlin
plugins {
id("me.qoomon.git-versioning") version "6.3.5"
id("me.qoomon.git-versioning") version "6.3.6"
}

version = "0.0.0-SNAPSHOT"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
}

group 'me.qoomon'
version '6.3.5'
version '6.3.6'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public abstract class GitVersioningPluginExtension {

public static final Logger LOGGER = LoggerFactory.getLogger(GitVersioningPluginExtension.class);

private static final Pattern VERSION_PATTERN = Pattern.compile(".*?(?<core>(?<major>\\d+)(?:\\.(?<minor>\\d+)(?:\\.(?<patch>\\d+))?)?)(?:-(?<label>.*))?|");
private static final Pattern VERSION_PATTERN = Pattern.compile(".*?(?<version>(?<core>(?<major>\\d+)(?:\\.(?<minor>\\d+)(?:\\.(?<patch>\\d+))?)?)(?:-(?<label>.*))?)|");

private static final String OPTION_NAME_GIT_REF = "git.ref";
private static final String OPTION_NAME_GIT_TAG = "git.tag";
Expand Down Expand Up @@ -552,7 +552,7 @@ private Map<String, Supplier<String>> generateGlobalFormatPlaceholderMap(GitSitu

final Lazy<Matcher> descriptionTagVersionMatcher = Lazy.by(() -> matchVersion(descriptionTag.get()));

placeholderMap.put("describe.tag.version", Lazy.by(() -> notNullOrDefault(descriptionTagVersionMatcher.get().group(), "0.0.0")));
placeholderMap.put("describe.tag.version", Lazy.by(() -> notNullOrDefault(descriptionTagVersionMatcher.get().group("version"), "0.0.0")));

placeholderMap.put("describe.tag.version.core", Lazy.by(() -> notNullOrDefault(descriptionTagVersionMatcher.get().group("core"), "0")));

Expand Down

0 comments on commit 38d73f0

Please sign in to comment.