Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 562a291

Browse files
committed
publish COMMIT_TIMESTAMP as metadata for SCRIPT version strategy
1 parent a74a43d commit 562a291

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/fr/brouillard/oss/jgitver/impl/ScriptVersionStrategy.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ public Version build(Commit head, List<Commit> parents) throws VersionCalculatio
123123

124124
try (final RevWalk walk = new RevWalk(getRepository())) {
125125
final RevCommit rc = walk.parseCommit(head.getGitObject());
126-
127-
metaProps.put(Metadatas.COMMIT_TIMESTAMP.name(), GitUtils.getTimestamp(rc.getAuthorIdent().getWhen().toInstant()));
126+
getRegistrar().registerMetadata(Metadatas.COMMIT_TIMESTAMP, GitUtils.getTimestamp(rc.getAuthorIdent().getWhen().toInstant()));
128127
}
129128

130129
registrar.registerMetadata(Metadatas.BASE_COMMIT_ON_HEAD, "" + isBaseCommitOnHead(head, base));

0 commit comments

Comments
 (0)