You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/08 09:04:38 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #5228: [WIP] Build - Add Git Properties Information via Plugin

nastra commented on code in PR #5228:
URL: https://github.com/apache/iceberg/pull/5228#discussion_r916616541


##########
build.gradle:
##########
@@ -73,6 +83,22 @@ subprojects {
   apply plugin: 'nebula.dependency-recommender'
   apply plugin: 'java-library'
 
+  // apply this plugin in a try-catch block so that we can handle cases without .git directory
+  // apply to subprojects so that git properties information is available for runtime debugging and tests
+  //  e.g. sending build SHA as headers
+  try {
+    apply plugin: 'com.gorylenko.gradle-git-properties'
+    gitProperties {
+      gitPropertiesName = "${project.name}-version.properties"
+      extProperty = 'gitProps'
+      failOnNoGitDirectory = false

Review Comment:
   nit: I wonder if the try-catch is necessary with `failOnNoGitDirectory=false`. Did you have a chance to try this without a .git directory?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org