rdblue commented on a change in pull request #468: Enable build without .git directory URL: https://github.com/apache/incubator-iceberg/pull/468#discussion_r323514029
########## 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: I think this should default to version, since we use this to override version in javadocs. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org