kbendick commented on PR #5186:
URL: https://github.com/apache/iceberg/pull/5186#issuecomment-1173185258
`version.properties` is added to core jar and thus runtime jars:
```bash
$ jar -tvf
spark/v3.3/spark-runtime/build/libs/iceberg-spark-runtime-3.3_2.12-0.14.0-SNAPSHOT.jar
| grep version.properties
291 Fri Feb 01 00:00:00 PST 1980
org/apache/iceberg/util/version.properties
903 Fri Feb 01 00:00:00 PST 1980 org/apache/hc/client5/version.properties
839 Fri Feb 01 00:00:00 PST 1980 org/apache/hc/core5/version.properties
```
`version.properties` is accessible at runtime:
```scala
$ spark-shell --jars
spark/v3.3/spark-runtime/build/libs/iceberg-spark-runtime-3.3_2.12-0.14.0-SNAPSHOT.jar
scala> import org.apache.iceberg.util.VersionPropertiesUtil;
import org.apache.iceberg.util.VersionPropertiesUtil
scala> VersionPropertiesUtil.gitHashFull()
res0: String = aceda8990a62e0b36a895cb5f5d49c4ee8d82d6f
scala> VersionPropertiesUtil.gitHash()
res1: String = aceda8990a
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]