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/04 15:22:08 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #5162: [WIP][BUILD] Add Build Attributes to Generated Manifests for Jar Output

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


##########
build.gradle:
##########
@@ -636,6 +653,10 @@ String getVersionFromFile() {
   return file('version.txt').text.trim()
 }
 
+String gitBuildSha() {

Review Comment:
   I don't think this is actually needed. We can just use `versionDetails().gitHash` from the `gradle-git-version` plugin



##########
build.gradle:
##########
@@ -149,6 +153,19 @@ subprojects {
       exceptionFormat "full"
     }
   }
+
+  jar {
+    manifest {
+      attributes(
+        "Implementation-Title": project.name,
+        "Implementation-Version": project.version,
+        "Build-SHA": project.buildSha,

Review Comment:
   you can directly use `versionDetails().gitHash` here



##########
build.gradle:
##########
@@ -149,6 +153,19 @@ subprojects {
       exceptionFormat "full"
     }
   }
+

Review Comment:
   placing this entire block under `subprojects` right after the `test` block in https://github.com/apache/iceberg/blob/b4ed29b2af16aa88b5da842c64a8cc3630583ada/build.gradle#L151 worked for me



-- 
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