[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #468: Enable build without .git directory
rdblue commented on a change in pull request #468: Enable build without .git directory URL: https://github.com/apache/incubator-iceberg/pull/468#discussion_r325873864 ## 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' Review comment: I think we should use the contents of `version.txt` if the file exists, and the git version otherwise. That way, the same build command works. 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
[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #468: Enable build without .git directory
rdblue commented on a change in pull request #468: Enable build without .git directory URL: https://github.com/apache/incubator-iceberg/pull/468#discussion_r324267534 ## 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' Review comment: > I think we might also want to build with version from version.txt sometimes even if it's regular git clone That sounds like a good idea to 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. 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
[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #468: Enable build without .git directory
rdblue commented on a change in pull request #468: Enable build without .git directory URL: https://github.com/apache/incubator-iceberg/pull/468#discussion_r323514194 ## 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' Review comment: Can this version be read from a file instead of defaulted? A source tarball release won't include a .git directory, but needs to build the right version. We could add a file to the root that specifies the version that this reads to set the version correctly. 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
[GitHub] [incubator-iceberg] rdblue commented on a change in pull request #468: Enable build without .git directory
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