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 2019/09/12 21:35:47 UTC

[GitHub] [incubator-iceberg] kings129 commented on a change in pull request #468: Enable build without .git directory

kings129 commented on a change in pull request #468: Enable build without .git directory
URL: https://github.com/apache/incubator-iceberg/pull/468#discussion_r323959346
 
 

 ##########
 File path: build.gradle
 ##########
 @@ -458,3 +458,22 @@ project(':iceberg-spark-runtime') {
   }
 }
 
+String getProjectVersion() {
+  try {
+    return gitVersion()
+  } catch (NullPointerException e) {
+    def noGitVersion = '0.1.0-SNAPSHOT'
+    println "no .git directory available, use version $noGitVersion"
+    return noGitVersion
+  }
+}
+
+String getBranchName() {
+  try {
+    return versionDetails().branchName
+  } catch (NullPointerException e) {
+    def branchName = 'noGitBranch'
 
 Review comment:
   Makes sense, change to use version read from file.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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