Skip to content

Commit

Permalink
[AMORO-3152] Make git-commit-plugin fail on no git dir configurable (a…
Browse files Browse the repository at this point in the history
…pache#3126)

We add conf to fail silent when no git dir before, so that it would not block the
release process, but it may not fail in normal mode also, in this commit
we add a profile to enable the check, so that build will fail when no git dir found.
  • Loading branch information
klion26 authored Sep 3, 2024
1 parent aa17fbd commit d26fc02
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions amoro-ams/amoro-ams-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
<name>Amoro Project AMS Server</name>
<url>https://amoro.apache.org</url>

<properties>
<git-commit-id-plugin.fail-on-no-git-dir>false</git-commit-id-plugin.fail-on-no-git-dir>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.amoro</groupId>
Expand Down Expand Up @@ -415,8 +419,8 @@
</execution>
</executions>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
<failOnNoGitDirectory>${git-commit-id-plugin.fail-on-no-git-dir}</failOnNoGitDirectory>
<failOnUnableToExtractRepoInfo>${git-commit-id-plugin.fail-on-no-git-dir}</failOnUnableToExtractRepoInfo>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>
Expand Down Expand Up @@ -491,5 +495,11 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>fail-on-no-git-dir</id>
<properties>
<git-commit-id-plugin.fail-on-no-git-dir>true</git-commit-id-plugin.fail-on-no-git-dir>
</properties>
</profile>
</profiles>
</project>

0 comments on commit d26fc02

Please sign in to comment.