Skip to content

Commit 38d73f0

Browse files
committed
fix value of describe.tag.version placeholder
1 parent 68411b8 commit 38d73f0

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
# Changelog
22

3+
## 6.3.6
4+
5+
##### Fixes
6+
- fix value of describe.tag.version placeholder
7+
8+
39
## 6.3.5
410

511
##### Fixes
612
- Improve compatibility with Gradle Configuration Cache #99
713

14+
815
## 6.3.4
916

1017
##### Fixes

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This plugin can virtually set project version and properties, based on current *
2828

2929
```groovy
3030
plugins {
31-
id 'me.qoomon.git-versioning' version '6.3.5'
31+
id 'me.qoomon.git-versioning' version '6.3.6'
3232
}
3333
3434
version = '0.0.0-SNAPSHOT'
@@ -41,7 +41,7 @@ gitVersioning.apply {
4141

4242
```kotlin
4343
plugins {
44-
id("me.qoomon.git-versioning") version "6.3.5"
44+
id("me.qoomon.git-versioning") version "6.3.6"
4545
}
4646

4747
version = "0.0.0-SNAPSHOT"

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins {
1212
}
1313

1414
group 'me.qoomon'
15-
version '6.3.5'
15+
version '6.3.6'
1616
sourceCompatibility = JavaVersion.VERSION_11
1717
targetCompatibility = JavaVersion.VERSION_11
1818

src/main/java/me/qoomon/gradle/gitversioning/GitVersioningPluginExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public abstract class GitVersioningPluginExtension {
4747

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

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

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

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

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

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

0 commit comments

Comments
 (0)