Skip to content

Commit

Permalink
Use git commit time for reproducible timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpaljak committed Apr 4, 2024
1 parent d9f36c0 commit 127dc2d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
8 changes: 3 additions & 5 deletions capfile/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
</parent>
<artifactId>capfile</artifactId>
<name>JavaCard CAP file library</name>
<properties>
<project.build.outputTimestamp>${git.commit.time}</project.build.outputTimestamp>
</properties>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
Expand All @@ -29,9 +32,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>

</plugins>
</build>
</project>
17 changes: 17 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- GH Actions fails sometimes on first try -->
<maven.wagon.http.retryHandler.count>2</maven.wagon.http.retryHandler.count>
<project.build.outputTimestamp>${git.commit.time}</project.build.outputTimestamp>
</properties>
<repositories>
<repository>
Expand Down Expand Up @@ -76,6 +77,22 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>8.0.2</version>
<executions>
<execution>
<id>get-git-timestamp</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<dateFormatTimeZone>UTC</dateFormatTimeZone>
</configuration>
</plugin>
<!-- Compiler -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit 127dc2d

Please sign in to comment.