File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
src/main/java/me/qoomon/gradle/gitversioning Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,10 @@ gitVersioning.apply {
171
171
- The ` HEAD ` commit timestamp formatted as ` yyyyMMdd.HHmmss `
172
172
- e.g. '20190616.161442'
173
173
174
+ - ` ${dirty} `
175
+ - A dirty flag indicator
176
+ - resolves to '-DIRTY' if repo is in dirty state, empty string otherwise
177
+
174
178
- ` Pattern Groups `
175
179
- Contents of group in the regex pattern can be addressed by ` group name ` or ` group index ` e.g.
176
180
- Named Group Example
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ plugins {
12
12
}
13
13
14
14
group ' me.qoomon'
15
- version ' 2.0 .0'
15
+ version ' 2.1 .0'
16
16
17
17
sourceCompatibility = JavaVersion . VERSION_1_8
18
18
targetCompatibility = JavaVersion . VERSION_1_8
@@ -22,7 +22,7 @@ repositories {
22
22
}
23
23
24
24
dependencies {
25
- implementation ' me.qoomon:git-versioning:0.1 .0'
25
+ implementation ' me.qoomon:git-versioning:0.2 .0'
26
26
implementation ' org.apache.maven:maven-artifact:3.6.0'
27
27
implementation ' me.qoomon:unchecked-exceptions:1.0.0'
28
28
implementation ' com.google.guava:guava:27.0.1-jre'
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ public void apply(GitVersioningPluginConfig config) {
92
92
extraProperties .set ("git.commit.timestamp.datetime" , toTimestampDateTime (gitVersionDetails .getCommitTimestamp ()));
93
93
extraProperties .set ("git.ref" , gitVersionDetails .getCommitRefName ());
94
94
extraProperties .set ("git." + gitVersionDetails .getCommitRefType (), gitVersionDetails .getCommitRefName ());
95
+ extraProperties .set ("git.dirty" , Boolean .toString (!gitVersionDetails .isClean ()));
95
96
});
96
97
}
97
98
You can’t perform that action at this time.
0 commit comments